/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Game1 game = new Game1()) { game.Run(); } }
public MenuGS(Game1 game) : base(game) { btnSize = new Vector2(200, 50); Vector2 middle = new Vector2(game.GraphicsDevice.Viewport.Width / 2, game.GraphicsDevice.Viewport.Height / 2); loadTextures(); buttons.Add(new MenuButton(startBtnTex, startBtnTexS, "NG",new Vector2(middle.X-btnSize.X/2, middle.Y - 2*btnSize.Y))); buttons.Add(new MenuButton(freeBtnTex, freeBtnTexS, "FR", new Vector2(middle.X - btnSize.X / 2, middle.Y - btnSize.Y))); buttons.Add(new MenuButton(controlBtnTex, controlBtnTexS, "C", new Vector2(middle.X - btnSize.X / 2, middle.Y))); buttons.Add(new MenuButton(exitBtnTex, exitBtnTexS, "E", new Vector2(middle.X - btnSize.X / 2, middle.Y + btnSize.Y))); game.IsMouseVisible = true; previousMouse = currentMouse = Mouse.GetState(); }
public GameState(Game1 game) { this.game = game; }
public BeginGameGS(Game1 game) : base(game) { font = game.Content.Load<SpriteFont>("countdownFont"); ChangeTextPosition(); }
public ControlsGS(Game1 game) : base(game) { font = game.Content.Load<SpriteFont>("countdownFont"); currentMouse = previousMouse = Mouse.GetState(); }
public FreeRideGS(Game1 game) : base(game) { }