예제 #1
0
    void Start()
    {
        string menuToShow = FirstMenuManager.GetFirstMenuName();

        foreach (Transform child in transform)
        {
            if (child.name == menuToShow)
            {
                child.gameObject.SetActive(true);
            }
            else
            {
                child.gameObject.SetActive(false);
            }
        }

        // Return to showing first the main interface after a win/draw/lose screen was shown first
        FirstMenuManager.SetFirstMenuName("Main Interface");
    }
예제 #2
0
 private void EndGame()
 {
     // Set the menu to match over and load the UI scene.
     FirstMenuManager.SetFirstMenuName("Match Over");
     levelManager.LoadLevel("Start Screen");
 }