void Start()
    {
        gameManagerControler = gameObject.GetComponent <GameManagerControler>();

        pathPoints = new List <Transform>();
        // add points
        pathPoints.AddRange(gameManagerControler.getPath().GetComponentsInChildren <Transform>());
        // remove parrent
        pathPoints.RemoveAt(0);
    }
示例#2
0
 public void Start()
 {
     gameManagerControler = GameObject.FindObjectOfType <GameManagerControler> ().GetComponent <GameManagerControler> ();
     Debug.Log(GameObject.FindObjectOfType <GameManagerControler> ());
 }