Exemple #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Exemple #2
0
        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();
        }
Exemple #3
0
 public GameState(Game1 game)
 {
     this.game = game;
 }
Exemple #4
0
 public BeginGameGS(Game1 game)
     : base(game)
 {
     font = game.Content.Load<SpriteFont>("countdownFont");
     ChangeTextPosition();
 }
Exemple #5
0
 public ControlsGS(Game1 game)
     : base(game)
 {
     font = game.Content.Load<SpriteFont>("countdownFont");
     currentMouse = previousMouse = Mouse.GetState();
 }
Exemple #6
0
 public FreeRideGS(Game1 game)
     : base(game)
 {
 }