예제 #1
0
    void Awake()
    {
        var button = GetComponent <Button>();

        button.onClick.AddListener(() =>
        {
            levelManager = FindObjectOfType <SingletonLevelManager>();
            levelManager.LoadRandomLevel();
        });
    }
예제 #2
0
 void NewGameOnClick()
 {
     levelController.LoadRandomLevel();
 }