Beispiel #1
0
 public void GameOver()
 {
     IsGameOver     = true;
     Time.timeScale = 0;
     TapsellStandardBanner.Show();
     CancelInvoke("AddScore");
     if (Score > BestScore)
     {
         BestScore = Score;
         PlayerPrefs.SetInt(MainController.Prefs_BestScore_Key, BestScore);
     }
     ColorEffect.ColorIndex++;
     PlayerPrefs.SetInt(MainController.Prefs_ColorIndex_Key, ColorEffect.ColorIndex);
     ColorEffect.ColorIndex--;
     PlayingUI.SetActive(false);
     GameOverScoreText.text     = "SCORE\n" + score;
     GameOverBestScoreText.text = "BEST SCORE\n" + bestScore;
     GameOverUI.SetActive(true);
     playingBackgroungMusic.Pause();
     playingBackgroungMusicTime = playingBackgroungMusic.time;
     PlayerPrefs.Save();
 }
Beispiel #2
0
 void Start()
 {
     Time.timeScale = 1;
     TapsellStandardBanner.Hide();
     InvokeRepeating("addScore", 1f, 1f);
 }
Beispiel #3
0
 void Start()
 {
     TapsellStandardBanner.Hide();
 }