Esempio n. 1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Esempio n. 2
0
 public Game1()
 {
     graphics = new GraphicsDeviceManager(this);
     graphics.PreferredBackBufferHeight = 800;
     graphics.PreferredBackBufferWidth = 1200;
     Content.RootDirectory = "Content";
     this.wasChecked = false;
     this.gameStarted = false;
     instance = this;
 }
Esempio n. 3
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height - 100;
            graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width - 250;
            Content.RootDirectory = "Content";
            this.wasChecked = false;
            this.gameStarted = false;
            instance = this;

            int gameHeight = Game1.GetHeight();
            int gameWidth = Game1.GetWidth();
            Game1.heightRatio = (double)gameHeight / 800;
            Game1.widthRatio = (double)gameWidth / 1200;
        }