Esempio n. 1
0
 /// <summary>
 /// End the game by loading a Game Over scene.
 /// </summary>
 public void EndGame()
 {
     ZombieRoundStatisticsHandler.SaveStatistics(ZombieRoundStatisticsType.ZombieRoundsSurvived, zombieRoundHandler.CurrentRound - 1);
     SceneManager.LoadScene(Constants.Scene.GameOver);
 }
    /// <summary>
    /// Display the number of zombie rounds the player has survived.
    /// </summary>
    private void DisplayZombieRoundsSurvived()
    {
        var zombieRoundsSurvived = ZombieRoundStatisticsHandler.GetStatistics(ZombieRoundStatisticsType.ZombieRoundsSurvived);

        roundsSurvivedText.text = string.Format(Constants.RoundStatistics.YouSurvivedRoundsText, (int)(object)zombieRoundsSurvived);
    }