// Use this for initialization
    void Start()
    {
        textScript = GameObject.Find("Hud").GetComponent<TextAreaScript>();

        PlayerPosition = GameObject.Find("Player").transform;
        _nextLevelNumber = int.Parse(transform.parent.name.Substring(transform.parent.name.Length-1)) + 1;

        if (GameObject.Find("Level" + (_nextLevelNumber)))
            if (GameObject.Find("Level" + (_nextLevelNumber)).transform.GetChild(0).Find("PlayerStartPoint").transform)
                NextLevelPosition = GameObject.Find("Level" + (_nextLevelNumber)).transform.GetChild(0).transform.FindChild("PlayerStartPoint").transform;
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     area = GameObject.Find("Hud").GetComponent<TextAreaScript>();
 }