Exemplo n.º 1
0
 private void DrawApple(Apple apple)
 {
     try
     {
         Invoke(
             new Action(() =>
         {
             _board.FillEllipse(Brushes.Red, apple.Position.ToRectangle());
         }
                        ));
     }
     catch (Exception)
     {
     }
 }
Exemplo n.º 2
0
 public Game()
 {
     Player    = new Player(MapCenter);
     Apple     = new Apple(GetRandom());
     Direction = Vector2.Right;
 }