private void handleLevelOver() { if (!this.roundOneOver) { this.roundOneOver = true; this.enableNextLevel(.5); } else if (!this.roundTwoOver) { this.roundTwoOver = true; this.enableNextLevel(1); } else if (!this.roundThreeOver) { this.roundThreeOver = true; this.handleGameOver(); } this.playerManager.IncrementLevel(); var level = new LevelIncreasedEventArgs { Level = this.playerManager.Level }; this.LevelIncreased?.Invoke(this, level); }
private void onLevelUpdated(object sender, LevelIncreasedEventArgs levelIncreased) { this.madeItHomeElement.IsMuted = true; this.levelCompleteElement.IsMuted = false; this.levelCompleteElement.Play(); this.level = levelIncreased.Level; this.levelTextBlock.Text = "Level: " + this.level; }