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.
Afficher le fichier Open project: scemino/nscumm Class Usage Examples

Méthodes publiques

Свойство 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

Méthodes publiques

Méthode 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 méthode

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

Update() public méthode

Reads the latest state of the keyboard and gamepad.
public Update ( ) : void
Résultat void

Property Details

CurrentGamePadState public_oe property

public GamePadState,Microsoft.Xna.Framework.Input CurrentGamePadState
Résultat Microsoft.Xna.Framework.Input.GamePadState

CurrentKeyboardState public_oe property

public KeyboardState,Microsoft.Xna.Framework.Input CurrentKeyboardState
Résultat Microsoft.Xna.Framework.Input.KeyboardState

LastGamePadState public_oe property

public GamePadState,Microsoft.Xna.Framework.Input LastGamePadState
Résultat Microsoft.Xna.Framework.Input.GamePadState

LastKeyboardState public_oe property

public KeyboardState,Microsoft.Xna.Framework.Input LastKeyboardState
Résultat Microsoft.Xna.Framework.Input.KeyboardState