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); }
private void OnEnable() { _resScore = GetComponent <Text>(); _resScore.text = "Ваш результат : " + AddScore.GetScore() + "\n" + "Лучший результат : " + PlayerPrefs.GetInt("HighScore"); }