public void LoadFinalScore() { finalScore.UpdateText(textController.GetTextValue()); int finalScoreValue = currentProgression == ProgressionMode.SLOW ? int.Parse(PlayerPrefs.GetString("normal")) : int.Parse(PlayerPrefs.GetString("rush")); bool enabled = finalScoreValue < int.Parse(textController.GetTextValue()) ? true : false; onPlayerLost?.Invoke(enabled); }
public void LoadInScores() { if (!PlayerPrefs.HasKey("normal")) { PlayerPrefs.SetString("normal", "5000"); } if (!PlayerPrefs.HasKey("rush")) { PlayerPrefs.SetString("rush", "5000"); } normalScore.UpdateText(PlayerPrefs.GetString("normal")); rushScore.UpdateText(PlayerPrefs.GetString("rush")); }