Exemplo n.º 1
0
 protected override void LoadContent()
 {
     FontManager.LoadFonts(this, "Segoe");
     _screenEngine = ScreenEngine.Initialize(this);
     Components.Add(ScreenEngine.ScreenComponent);
     _screenEngine.NavigateToScreen(new StartScreen());
     _screenEngine.SetScreenSize(_graphics.PreferredBackBufferWidth, _graphics.PreferredBackBufferHeight);
 }
Exemplo n.º 2
0
        protected override void Update(GameTime gameTime)
        {
            //if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            //    Exit();
            if (_invalid)
            {
                _graphics.PreferredBackBufferWidth  = _width;
                _graphics.PreferredBackBufferHeight = _height;
                _graphics.ApplyChanges();
                _screenEngine.SetScreenSize(_width, _height);
                _invalid = false;
            }

            base.Update(gameTime);
        }