Beispiel #1
0
        private void handleLifeLost()
        {
            this.playerOnMovingLog = false;
            this.playerManager.Sprite.Visibility = Visibility.Collapsed;
            this.playerManager.DecrementLives();

            var lives = new LivesLostEventArgs {
                Lives = this.playerManager.Lives
            };

            this.LifeLost?.Invoke(this, lives);

            this.timeRemainingTimer.Stop();
            this.deathAnimationActive = true;
            this.handleStartDeathAnimation();

            if (!this.checkForGameOver())
            {
                this.setPlayerToCenterOfBottomLane();
            }
        }
Beispiel #2
0
 private void onLivesCountUpdated(object sender, LivesLostEventArgs lives)
 {
     this.livesTextBlock.Text = "Lives: " + lives.Lives;
 }