Example #1
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferWidth = 1024;
            graphics.PreferredBackBufferHeight = 768;
            //graphics.PreferMultiSampling = false;
            graphics.IsFullScreen = false;

            currentState = GameState.MainMenu;
            // create the entity manager
            entitiesManager = new EntitiesManager(this);

            Content.RootDirectory = "Content";

            //Reflection hack for accessing gameTime. Will it work?
            gameTime = (GameTime)typeof(Game).GetField("gameTime", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
        }
Example #2
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferWidth  = 1024;
            graphics.PreferredBackBufferHeight = 768;
            //graphics.PreferMultiSampling = false;
            graphics.IsFullScreen = false;

            currentState = GameState.MainMenu;
            // create the entity manager
            entitiesManager = new EntitiesManager(this);

            Content.RootDirectory = "Content";

            //Reflection hack for accessing gameTime. Will it work?
            gameTime = (GameTime)typeof(Game).GetField("gameTime", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(this);
        }