Пример #1
0
 public void GameOverFunction()
 {
     this.gameObject.SetActive(true);
     SetGameOverText();
     StartCoroutine(CoroutineUtility.RunThenCallback(
                        winDisplayPanel.FadeIn(),
                        () => this.TimeDelayCall(
                            StartCountdown, delayBeforeResetCountdown)));
 }
Пример #2
0
 public void TogglePause()
 {
     // Case: not paused now => toggling will pause
     if (!SceneStateManager.instance.paused)
     {
         AudioManager.instance.PauseSound.Play(1.0f);
         StartCoroutine(pauseMenuPanel.FadeIn());
         SceneStateManager.instance.PauseTime();
     }
     else
     {
         SceneStateManager.instance.UnPauseTime();
         AudioManager.instance.UnPauseSound.Play(2.5f);
         StartCoroutine(pauseMenuPanel.FadeOut());
     }
 }