Exemplo n.º 1
0
    void Start()
    {
        sceneNavigator = (SceneNavigator)FindObjectOfType <SceneNavigator> ();
        Button b = GetComponentInParent <Button> ();

        b.GetComponentInChildren <Button> ().onClick.AddListener(() => sceneNavigator.GoToLevelUp());
    }
Exemplo n.º 2
0
 void Start()
 {
     sceneNavigator = (SceneNavigator)FindObjectOfType<SceneNavigator> ();
     Button b = GetComponentInParent<Button> ();
     b.GetComponentInChildren<Button> ().onClick.AddListener(() => sceneNavigator.GoToLevelUp());
 }