コード例 #1
0
 public void LoadGame()
 {
     if (PlayerPrefs.GetInt("HighScore") < AddScore.GetScore())
     {
         PlayerPrefs.SetInt("HighScore", AddScore.GetScore());
     }
     AddScore.ResetScore();
     _hud?.gameObject.SetActive(true);
     gameObject.SetActive(false);
     _game?.SetActive(true);
     _endGame?.gameObject.SetActive(false);
 }
コード例 #2
0
 private void OnEnable()
 {
     _resScore      = GetComponent <Text>();
     _resScore.text = "Ваш результат : " + AddScore.GetScore() + "\n" + "Лучший результат : " + PlayerPrefs.GetInt("HighScore");
 }