示例#1
0
 void GotoGameOverScreen()
 {
     Clear();
     PlaySound(GameOverSound);
     HUD.gameObject.SetActive(false);
     GameOverScreen.Init(CurrentLevelIndex, Purse.Value, GotoWelcomeScreen);
     GameOverScreen.Overlay.Show();
 }
示例#2
0
    //////////////////////////////////////////
    /// GameOver()
    /// Effectively ends the game in victory
    /// or defeat.
    //////////////////////////////////////////
    private void GameOver(bool i_bVictory)
    {
        m_bGameOver = true;
        GameObject     goGameOver = gameObject.InstantiateUI(GameOverScreen);
        GameOverScreen script     = goGameOver.GetComponent <GameOverScreen>();

        script.Init(i_bVictory);
    }
示例#3
0
 public void GameOver(string reason)
 {
     if (!GameController.Instance.isGameover)
     {
         GameController.Instance.isGameover = true;
         gameoverScreen.gameObject.SetActive(true);
         string currentTime = (Mathf.Round(Time.time * 100f) / 100f).ToString();
         gameoverScreen.Init(reason, currentTime);
     }
 }