/* * Lose the game. */ public static void Lose() { m_LoseScreen = true; GUIManager.BlackFade(true, 5.0f); Time.timeScale = 0.0f; GUIManager.ShowLoseScreen(); }
/* * Resume the game. */ public void ResumeGame() { if (!m_PauseScreen || m_LoseScreen) { return; } m_PauseScreen = false; GUIManager.BlackFade(false, 5.0f); Time.timeScale = 1.0f; GUIManager.HidePauseScreen(); }
/* * Called on first frame of game. */ private void Start() { // Fade from black. m_LoseScreen = false; m_PauseScreen = false; GUIManager.BlackFade(false); // Deliberately don't reset these, so after each restart we // don't see help message. Rebooting game will stop this though. // GameStarted = false; // FirstReleased = -1; }
/* * Pauses the game. */ public void PauseGame() { // Don't allow pause on lose screen. if (m_LoseScreen || m_PauseScreen) { return; } m_PauseScreen = true; GUIManager.BlackFade(true, 5.0f); Time.timeScale = 0.0f; GUIManager.ShowPauseScreen(); }