Beispiel #1
0
        public void AddScore(Score score, IWhackable whackable)
        {
            totalScore = new Score(totalScore.value + score.value);
            ShowScore(score, whackable);

            ScoreUpdatedEvent?.Invoke(totalScore.value);
        }
Beispiel #2
0
        public void EnemyDownedHandler(string enemyTag)
        {
            switch (enemyTag)
            {
            case "EnemyAwacs":
                Score += AwacsScore;
                break;

            case "EnemyHawkeye":
                Score += HawkeyeScore;
                break;

            case "EnemySeahawk":
                Score += SeahawkScore;
                break;

            default:
                return;
            }
            onScoreUpdated.Invoke(Score);
        }
Beispiel #3
0
 public void ResetScore()
 {
     totalScore = new Score(0);
     ScoreUpdatedEvent?.Invoke(totalScore.value);
     NewHighscoreSet = false;
 }
Beispiel #4
0
 public static void PublishScoreUpdatedEvent(ScoreKeeper scoreKeeper)
 {
     ScoreUpdatedEvent?.Invoke(scoreKeeper);
     Instance.EmitSignal(nameof(ScoreUpdated), scoreKeeper);
 }