void BestTimeUpdate()
 {
     if (heatMode)
     {
         if (timer.BCompareTime(timer.GetTime(), bestTimeHeat))
         {
             CallText("New Best Time!!!");
             bestTimeHeat = "9999999:9999999";
         }
     }
     else if (normalMode)
     {
         if (timer.BCompareTime(timer.GetTime(), bestTimeNormal))
         {
             CallText("New Best Time!!!");
             bestTimeNormal = "9999999:9999999";
         }
     }
 }
Exemple #2
0
    public static void SaveGame()
    {
        PlayerPrefs.SetInt(Literals.Saves.First_SAVE, 1);

        if (GameInstructions.GAME_MODE == Literals.GAME_MODES.NORNAL_GAME_MODE)
        {
            if (scoreManager.Score >= PlayerPrefs.GetInt(Literals.Saves.BEST_SCORE_NORMAL))
            {
                PlayerPrefs.SetInt(Literals.Saves.BEST_SCORE_NORMAL, scoreManager.Score);
            }

            PlayerPrefs.SetString(Literals.Saves.BEST_TIME_NORMAL, lastTimer.CompareTime(lastTimer.GetTime(), PlayerPrefs.GetString(Literals.Saves.BEST_TIME_NORMAL)));

            if (KillStreakManager.KillStreak >= PlayerPrefs.GetInt(Literals.Saves.LONGEST_KILLSTREAK_NORMAL))
            {
                PlayerPrefs.SetInt(Literals.Saves.LONGEST_KILLSTREAK_NORMAL, KillStreakManager.KillStreak);
            }

            if (EnemyHealth.enemiesKilledCounter >= PlayerPrefs.GetInt(Literals.Saves.HIGHEST_ZOMBIES_KILLED_NORMAL))
            {
                PlayerPrefs.SetInt(Literals.Saves.HIGHEST_ZOMBIES_KILLED_NORMAL, EnemyHealth.enemiesKilledCounter);
            }

            if (scoreManager.Level >= PlayerPrefs.GetInt(Literals.Saves.TOP_LEVEL))
            {
                PlayerPrefs.SetInt(Literals.Saves.TOP_LEVEL, scoreManager.Level);
            }
        }
        else
        {
            if (scoreManager.Score >= PlayerPrefs.GetInt(Literals.Saves.BEST_SCORE_HEAT))
            {
                PlayerPrefs.SetInt(Literals.Saves.BEST_SCORE_HEAT, scoreManager.Score);
            }

            PlayerPrefs.SetString(Literals.Saves.BEST_TIME_HEAT, lastTimer.CompareTime(lastTimer.GetTime(), PlayerPrefs.GetString(Literals.Saves.BEST_TIME_HEAT)));

            if (KillStreakManager.KillStreak >= PlayerPrefs.GetInt(Literals.Saves.LONGEST_KILLSTREAK))
            {
                PlayerPrefs.SetInt(Literals.Saves.LONGEST_KILLSTREAK, KillStreakManager.KillStreak);
            }

            if (EnemyHealth.enemiesKilledCounter >= PlayerPrefs.GetInt(Literals.Saves.HIGHEST_ZOMBIES_KILLED))
            {
                PlayerPrefs.SetInt(Literals.Saves.HIGHEST_ZOMBIES_KILLED, EnemyHealth.enemiesKilledCounter);
            }

            if (scoreManager.Heat >= PlayerPrefs.GetInt(Literals.Saves.TOP_HEAT))
            {
                PlayerPrefs.SetInt(Literals.Saves.TOP_HEAT, scoreManager.Heat);
            }
        }

        PlayerPrefs.Save();
    }
Exemple #3
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     this.label1.Text = TimeClass.GetTime();
 }