Example #1
0
    /// <summary>
    /// Loads the main menu
    /// </summary>
    public void ReturnToMenu()
    {
        GameVariables.ClearPlayers();
        string menuName = "Menu";

        StartCoroutine(LoadMainMenu(menuName));
    }
Example #2
0
 /// <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);
 }