Exemplo n.º 1
0
 public void StartGame()
 {
     InitializeClasses();
     LineSegment.DrawSubject(Canvas);
     MovmentManager.DrawCoins(Canvas);
     MovmentManager.DrawPolice(Canvas);
     Car.CarManager(BitmapImage);
     MovmentManager.StartTimers();
 }
Exemplo n.º 2
0
 private void InitializeClasses()
 {
     if (Counter == 0)
     {
         Car            = new Car(Canvas);
         LineSegment    = new LineSegment(Canvas);
         Coins          = new Coins(Canvas);
         Police         = new Police(Canvas);
         ColiitionCoin  = new Collision(Car, Coins, MainWindow, Canvas, Police);
         MovmentManager = new MovmentManager(Car, LineSegment, Coins, Canvas, ColiitionCoin, Police, this);
         Counter++;
     }
 }
Exemplo n.º 3
0
        public void EndGame()
        {
            MovmentManager.StopTimers();

            switch (MessageInformation.WhenGameEnds())
            {
            case MessageBoxResult.Yes:
                RestartGame();
                break;

            case MessageBoxResult.No:
                MessageInformation.GoodByMessage();
                Application.Current.Shutdown();
                break;
            }
        }