public void GameOver() { _isGameOver = true; _isStarted = false; _isPaused = true; Pawn = null; Horde = null; GameOverFrame(); }
public void LevelComplete() { _isLevelFinished = true; _isStarted = false; _isPaused = true; Horde = null; LevelsCompleted++; TextBox3.Content = LevelsCompleted; LevelCompleteFrame(); }
private void Countdown() { Label l1 = new Label(); l1.FontSize = 78; l1.Content = 3; Canvas1.Children.Add(l1); l1.SetValue(Canvas.LeftProperty, LayoutMain.ActualWidth / 2 - l1.FontSize / 3); Int32Animation countdownAnim = new Int32Animation(); countdownAnim.From = 3; countdownAnim.To = 0; countdownAnim.Duration = TimeSpan.FromSeconds(4); countdownAnim.Completed += CountdownAnimCompleted; l1.BeginAnimation(Label.ContentProperty, countdownAnim); void CountdownAnimCompleted(object sender, EventArgs e) { l1.Visibility = Visibility.Hidden; Horde = new EnemyHorde(ref Canvas1); Pawn.CurrentHorde = Horde.Horde; } }