public void AddToScore(int amount) { Score += amount; inGameScoreText.UpdateScore(Score); inGameScoreText.Bounce(); int topScore = PlayerPrefs.GetInt("Top Score"); if (!hasNewTopScore && topScore > 0 && Score > topScore) { hasNewTopScore = true; topScoreEffect.DoNewTopScoreEffect(); } }
public void AddToScore(int amount) { score += amount; inGameScoreText.UpdateScore(score); inGameScoreText.Bounce(); }