Esempio n. 1
0
 public MenuHandler(Game1 game)
 {
     this.game = game;
     int x = 400 - BUTTON_WIDTH / 2;
     int y = 400 / 2 - NUMBER_OF_BUTTONS / 2 * BUTTON_HEIGHT - (NUMBER_OF_BUTTONS % 2) * BUTTON_HEIGHT / 2;
     for (int i = 0; i < NUMBER_OF_BUTTONS; i++)
     {
         buttonState[i] = BState.Up;
         buttonColor[i] = Color.White;
         buttonTimer[i] = 0.0;
         buttonRectangle[i] = new Rectangle(x, y, BUTTON_WIDTH, BUTTON_HEIGHT);
         y += BUTTON_HEIGHT * 2;
         
     }
 }
Esempio n. 2
0
 public GameHandler(Game1 game)
 {
     this.game = game;
 }
Esempio n. 3
0
 static void Main()
 {
     using (var game = new Game1())
         game.Run();
 }