private void onScoreCountUpdated(object sender, ScoreIncreasedEventArgs scoreIncreased) { this.madeItHomeElement.IsMuted = false; this.madeItHomeElement.Play(); this.score = scoreIncreased.Score; this.scoreTextBlock.Text = "Score: " + this.score; }
private void handlePlayerScored() { this.playerOnMovingLog = false; this.playerManager.IncrementScore(this.playerManager.TimeRemaining * this.playerManager.Lives); var score = new ScoreIncreasedEventArgs { Score = this.playerManager.Score }; this.ScoreIncreased?.Invoke(this, score); this.resetTimeRemainingTimer(); this.setPlayerToCenterOfBottomLane(); }
private void detectSuccessfulScore() { if (this.playerSuccessfullyCrossedRoad()) { this.detectCollisionBetweenFrogAndHome(); this.playerStats.IncreaseScore((DefaultValues.ProgressBarMaximum - this.currentProgressBarCount) * 10); var scoreIncreasedArgs = new ScoreIncreasedEventArgs { Score = this.playerStats.Score }; this.resetProgressBar(); this.ScoreIncreased?.Invoke(this, scoreIncreasedArgs); this.detectGameOver(); this.setPlayerToCenterOfBottomLane(); } }