private void Awake() { if (I == null) { I = this; } }
// Use this for initialization void Start() { ballCont = ball.GetComponent <BallContoller>(); o1List = new List <GameObject>(new GameObject[] { o2, o3, o4, o5 }); o2List = new List <GameObject>(new GameObject[] { o7, o8, o9, o11 }); orginList1 = new List <Vector3>(); orginList2 = new List <Vector3>(); for (int i = 0; i < o1List.Count; i++) { orginList1.Add(new Vector3(o1List[i].transform.position.x, o1List[i].transform.position.y)); } for (int i = 0; i < o2List.Count; i++) { orginList2.Add(new Vector3(o2List[i].transform.position.x, o2List[i].transform.position.y)); } for (int i = 0; i < o1List.Count; i++) { attackList1.Add(new Vector3(o1List[i].transform.position.x - 4, o1List[i].transform.position.y)); } for (int i = 0; i < o2List.Count; i++) { attackList2.Add(new Vector3(o2List[i].transform.position.x + 4, o2List[i].transform.position.y)); } for (int i = 0; i < o1List.Count; i++) { aattackList1.Add(new Vector3(o1List[i].transform.position.x - 7, o1List[i].transform.position.y)); } for (int i = 0; i < o2List.Count; i++) { aattackList2.Add(new Vector3(o2List[i].transform.position.x + 7, o2List[i].transform.position.y)); } for (int i = 0; i < o1List.Count; i++) { defList1.Add(new Vector3(o1List[i].transform.position.x + 2, o1List[i].transform.position.y)); } for (int i = 0; i < o2List.Count; i++) { defList2.Add(new Vector3(o2List[i].transform.position.x - 2, o2List[i].transform.position.y)); } for (int i = 0; i < o1List.Count; i++) { adefList1.Add(new Vector3(o1List[i].transform.position.x + 1, o1List[i].transform.position.y)); } for (int i = 0; i < o2List.Count; i++) { adefList2.Add(new Vector3(o2List[i].transform.position.x - 1, o2List[i].transform.position.y)); } }
// Use this for initialization void Start() { ballCont = ball.GetComponent <BallContoller>(); }