private void Awake() { _virusDeathSound = GetComponent <AudioSource>(); Singletone = this; PlayerNameText.text = TemporaryData.PlayerNickName; string pointsName = " infected"; // POINTS NAME #if UNITY_IOS pointsName = " people"; #endif PlayerScoreText.text = 0 + pointsName; if (PersistentData.HighScore.HasKey()) { PlayerHighScore.text = "High score: " + PersistentData.HighScore.Get().ToString(); } else { TurnOffHighScorePanel.Invoke(); PersistentData.HighScore.Set(0); } }
public void SetPlayerStats() { UIPlayerScore playerScore = UIPlayerScore.Singletone; _playerScore = playerScore.Score; _playerKills = playerScore.Kills; _isNewHighScore = playerScore.IsPlayerBeatLastHighScore; }