private void sc() { Wayline[] ky = Kylines(); Wayline line = ky[Random.Range(0, ky.Length)]; GameObject go = Instantiate(Gob[Random.Range(0, Gob.Length)], line.Waypoints[0], Quaternion.identity) as GameObject; xunlu xunlu = go.GetComponent <xunlu>(); xunlu.line = line; }
private void sc() { Wayline[] kyluxian = KYline(); Wayline line = kyluxian[Random.Range(0, kyluxian.Length)]; GameObject go = Instantiate(gameob, line.waypoints[0], Quaternion.identity) as GameObject; xunlu xunlu = go.GetComponent <xunlu>(); xunlu.line = line; xunlu.line.isus = false; }
private void sc() { Wayline[] kylj = kylines(); Wayline line = kylj[Random.Range(0, kylj.Length)]; GameObject go = Instantiate(cub, line.waypoints[0], Quaternion.identity) as GameObject; xunlu xunlu = go.GetComponent <xunlu>(); xunlu.line = line; xunlu.line.isok = false; }
private void FindLuXian() { lines = new Wayline[transform.childCount]; for (int i = 0; i < lines.Length; i++) { lines[i] = new Wayline(); lines[i].isus = true; lines[i].waypoints = new Vector3[transform.GetChild(i).childCount]; for (int point = 0; point < transform.GetChild(i).childCount; point++) { lines[i].waypoints[point] = transform.GetChild(i).GetChild(point).position; } } }
private void Awake() { ChoiceLine = Object.FindObjectsOfType <Wayline>(); randindex = Random.Range(0, 3); CurrentLine = ChoiceLine[randindex]; }