Пример #1
0
 public void RestartGame()
 {
     ////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;
     //call the HidePausePanel function of the ShowPanels script
     showPanels.HideEndGamePanel();
     mainCanvasGroup.alpha = 0f;
     MeterManager.instance.Reset();
     SceneManager.LoadScene(SceneManager.GetActiveScene().name);
 }
Пример #2
0
    private ShowPanels showPanels;                                                                              //Reference to ShowPanels script on UI GameObject, to show and hide panels


    void Awake()
    {
        //Get a reference to ShowPanels attached to UI object
        showPanels = GetComponent <ShowPanels> ();

        //Get a reference to PlayMusic attached to UI object
        playMusic = GetComponent <PlayMusic> ();

        // **** ver se é o local correto;

        showPanels.HideGameplayPanel();
        showPanels.ShowIntro();
        showPanels.HideMenu();
        showPanels.HideEndGamePanel();
    }
Пример #3
0
 public void RestartScene()
 {
     showPanels.HideEndGamePanel();
     inMainMenu = true;
     SceneManager.LoadScene(0);
 }
Пример #4
0
 public void RestartButtonClicked()
 {
     showPanels.HideEndGamePanel();
     UIManager.instance.RestartGame();
 }