C# Class NScumm.MonoGame.InputState

Helper for reading input from keyboard and gamepad. This public class tracks the current and previous state of both input devices, and implements query properties for high level input actions such as "move up through the menu" or "pause the game".
This public class is similar to one in the GameStateManagement sample.
Datei anzeigen Open project: scemino/nscumm Class Usage Examples

Public Properties

Property Type Description
CurrentGamePadState Microsoft.Xna.Framework.Input.GamePadState
CurrentKeyboardState Microsoft.Xna.Framework.Input.KeyboardState
LastGamePadState Microsoft.Xna.Framework.Input.GamePadState
LastKeyboardState Microsoft.Xna.Framework.Input.KeyboardState

Public Methods

Method Description
IsNewKeyPress ( Keys key ) : bool

Helper for checking if a key was newly pressed during this update.

Update ( ) : void

Reads the latest state of the keyboard and gamepad.

Method Details

IsNewKeyPress() public method

Helper for checking if a key was newly pressed during this update.
public IsNewKeyPress ( Keys key ) : bool
key Keys
return bool

Update() public method

Reads the latest state of the keyboard and gamepad.
public Update ( ) : void
return void

Property Details

CurrentGamePadState public_oe property

public GamePadState,Microsoft.Xna.Framework.Input CurrentGamePadState
return Microsoft.Xna.Framework.Input.GamePadState

CurrentKeyboardState public_oe property

public KeyboardState,Microsoft.Xna.Framework.Input CurrentKeyboardState
return Microsoft.Xna.Framework.Input.KeyboardState

LastGamePadState public_oe property

public GamePadState,Microsoft.Xna.Framework.Input LastGamePadState
return Microsoft.Xna.Framework.Input.GamePadState

LastKeyboardState public_oe property

public KeyboardState,Microsoft.Xna.Framework.Input LastKeyboardState
return Microsoft.Xna.Framework.Input.KeyboardState