예제 #1
0
 private void DrawApple(Apple apple)
 {
     try
     {
         Invoke(
             new Action(() =>
         {
             _board.FillEllipse(Brushes.Red, apple.Position.ToRectangle());
         }
                        ));
     }
     catch (Exception)
     {
     }
 }
예제 #2
0
파일: Game.cs 프로젝트: kusachiy/SnakeSnake
 public Game()
 {
     Player    = new Player(MapCenter);
     Apple     = new Apple(GetRandom());
     Direction = Vector2.Right;
 }