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(); } }
private void onLivesCountUpdated(object sender, LivesLostEventArgs lives) { this.livesTextBlock.Text = "Lives: " + lives.Lives; }