public void GameOverFunction() { this.gameObject.SetActive(true); SetGameOverText(); StartCoroutine(CoroutineUtility.RunThenCallback( winDisplayPanel.FadeIn(), () => this.TimeDelayCall( StartCountdown, delayBeforeResetCountdown))); }
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()); } }