Exemplo n.º 1
0
        protected override void Update(GameTime gameTime)
        {
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed ||
                Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }

            if (IsActive)
            {
                var inputState = InputState.GetCurrentState();
                _inputBindings.Update(inputState);

                _screens.HandleInput(inputState, _inputBindings);
            }

            _screens.Update(gameTime);

            base.Update(gameTime);
        }