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"); }
private void EndGame() { // Set the menu to match over and load the UI scene. FirstMenuManager.SetFirstMenuName("Match Over"); levelManager.LoadLevel("Start Screen"); }