/// <summary> /// Loads the main menu /// </summary> public void ReturnToMenu() { GameVariables.ClearPlayers(); string menuName = "Menu"; StartCoroutine(LoadMainMenu(menuName)); }
/// <summary> /// Quits the game without saving scores /// </summary> public void QuitGame() { GameVariables.Paused = false; GameVariables.EndLevel = false; GameVariables.ShowScores = false; GameVariables.Ready = 0; GameVariables.ClearPlayers(); SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex - SceneManager.GetActiveScene().buildIndex); // get the scene next in the queue after current //gameObject.SetActive(false); //EndLevelScript.CreatePlayerPanels(); //gameObject.SetActive(true); }