|
@@ -69,17 +69,18 @@ public class GongShi2 : MonoBehaviour
|
|
|
yield return new WaitForSeconds(0.1f);
|
|
|
|
|
|
|
|
|
- WebPosObj.transform.parent = parent;
|
|
|
Destroy(WebPosObj2);
|
|
|
WebPosObj2= go3;
|
|
|
+ WebPosObj.transform.parent = parent.parent;
|
|
|
+ WebPosObj2.transform.parent = parent.parent;
|
|
|
}
|
|
|
|
|
|
|
|
|
public static List<Vector2> GetWebPos(float th, float tw, float sceneLength, float sceneWidth)
|
|
|
{
|
|
|
Transform parent = (SceneIOCContainer.Instance.Pull("mesh_test") as GameObject).transform;
|
|
|
-
|
|
|
-
|
|
|
+ WebPosObj.transform.parent = parent;
|
|
|
+ WebPosObj2.transform.parent = parent;
|
|
|
List<Vector2> lvlist = new List<Vector2>();
|
|
|
Vector2 p1 = new Vector2(Mathf.Abs(WebPosObj.transform.localPosition.x / sceneLength * tw ), Mathf.Abs(th-((WebPosObj.transform.localPosition.z) / sceneWidth * th )));
|
|
|
lvlist.Add(p1);
|
|
@@ -87,6 +88,8 @@ public class GongShi2 : MonoBehaviour
|
|
|
lvlist.Add(p2);
|
|
|
Debug.Log("Web¶ËPos :" + p1);
|
|
|
Debug.Log("Web¶ËPos 2 :" + p2);
|
|
|
+ WebPosObj.transform.parent = parent.parent;
|
|
|
+ WebPosObj2.transform.parent = parent.parent;
|
|
|
return lvlist;
|
|
|
}
|
|
|
}
|