示例#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();
 }