C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
CurrentGamePadState Microsoft.Xna.Framework.Input.GamePadState
CurrentKeyboardState Microsoft.Xna.Framework.Input.KeyboardState
LastGamePadState Microsoft.Xna.Framework.Input.GamePadState
LastKeyboardState Microsoft.Xna.Framework.Input.KeyboardState

Открытые методы

Метод Описание
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.

Описание методов

IsNewKeyPress() публичный Метод

Helper for checking if a key was newly pressed during this update.
public IsNewKeyPress ( Keys key ) : bool
key Keys
Результат bool

Update() публичный Метод

Reads the latest state of the keyboard and gamepad.
public Update ( ) : void
Результат void

Описание свойств

CurrentGamePadState публичное свойство

public GamePadState,Microsoft.Xna.Framework.Input CurrentGamePadState
Результат Microsoft.Xna.Framework.Input.GamePadState

CurrentKeyboardState публичное свойство

public KeyboardState,Microsoft.Xna.Framework.Input CurrentKeyboardState
Результат Microsoft.Xna.Framework.Input.KeyboardState

LastGamePadState публичное свойство

public GamePadState,Microsoft.Xna.Framework.Input LastGamePadState
Результат Microsoft.Xna.Framework.Input.GamePadState

LastKeyboardState публичное свойство

public KeyboardState,Microsoft.Xna.Framework.Input LastKeyboardState
Результат Microsoft.Xna.Framework.Input.KeyboardState