示例#1
0
 private void onScoreCountUpdated(object sender, ScoreIncreasedEventArgs scoreIncreased)
 {
     this.madeItHomeElement.IsMuted = false;
     this.madeItHomeElement.Play();
     this.score = scoreIncreased.Score;
     this.scoreTextBlock.Text = "Score: " + this.score;
 }
示例#2
0
        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();
        }
示例#3
0
 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();
     }
 }