public void HandleInput(GameTime gameTime) { if (_current != null) { _current.HandleInput(gameTime); } _gameStateManager.HandleInput(gameTime); }
protected virtual void HandleInput() { inputHelper.Update(); if (inputHelper.KeyPressed(Keys.Escape)) { Exit(); } if (inputHelper.KeyPressed(Keys.F5)) { FullScreen = !FullScreen; } GameStateManager.HandleInput(inputHelper); }
/// <summary> /// Performs basic input handling and then calls HandleInput for the entire game world. /// </summary> protected void HandleInput() { inputHelper.Update(); // quit the game when the player presses ESC if (inputHelper.KeyPressed(Keys.Escape)) { Exit(); } // toggle full-screen mode when the player presses F5 if (inputHelper.KeyPressed(Keys.F5)) { FullScreen = !FullScreen; } GameStateManager.HandleInput(inputHelper); }