예제 #1
0
 private void CheckWin()
 {
     if (Settings.BlocksCount * 100 == _gamer.Score)
     {
         _timer.Stop();
         var endWindow = new EndWindow(this, _gamer, true);
         endWindow.Show();
     }
 }
예제 #2
0
 private void CheckLoss()
 {
     if (_field.Ball.Position.Y > PlayField.ActualHeight)
     {
         _timer.Stop();
         _isGame = false;
         _gamer.LifeCount--;
         _field.Ball.Move();
         SetProperties();
         WindowChangeHandler(null, null);
         UpdateCanvas();
         if (_gamer.LifeCount == 0)
         {
             _timer.Stop();
             var endWindow = new EndWindow(this, _gamer, false);
             endWindow.Show();
         }
     }
 }