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; } }
public GameHandler(Game1 game) { this.game = game; }
static void Main() { using (var game = new Game1()) game.Run(); }