Exemplo n.º 1
0
    // Restarts the game
    public void UnEndGame()
    {
        ScoreScript.money = 0;

        // Reloads the game scene
        SceneManager.LoadScene(SceneManager.GetActiveScene().name);

        //Set isPaused to false
        isPaused = false;

        //Set time.timescale to 1, this will cause animations and physics to continue updating at regular speed
        Time.timeScale = 1;

        // Removies the end game panels
        showPanels.HidePausePanel();
        showPanels.HideWinGamePanel();
        showPanels.HideLoseGamePanel();
    }