Property | Type | Description | |
---|---|---|---|
CurrentGamePadStates | Microsoft.Xna.Framework.Input.GamePadState[] | ||
CurrentKeyboardStates | Microsoft.Xna.Framework.Input.KeyboardState[] | ||
GamePadWasConnected | bool[] | ||
Gestures | List |
||
LastGamePadStates | Microsoft.Xna.Framework.Input.GamePadState[] | ||
LastKeyboardStates | Microsoft.Xna.Framework.Input.KeyboardState[] | ||
TouchState | TouchCollection |
Method | Description | |
---|---|---|
InputState ( ) : System.Collections.Generic |
Constructs a new input state.
|
|
IsButtonPressed ( Buttons button, PlayerIndex controllingPlayer, PlayerIndex &playerIndex ) : bool |
Helper for checking if a button was pressed during this update. The controllingPlayer parameter specifies which player to read input for. If this is null, it will accept input from any player. When a button press is detected, the output playerIndex reports which player pressed it.
|
|
IsKeyPressed ( Keys key, PlayerIndex controllingPlayer, PlayerIndex &playerIndex ) : bool |
Helper for checking if a key was pressed during this update. The controllingPlayer parameter specifies which player to read input for. If this is null, it will accept input from any player. When a keypress is detected, the output playerIndex reports which player pressed it.
|
|
IsNewButtonPress ( Buttons button, PlayerIndex controllingPlayer, PlayerIndex &playerIndex ) : bool |
Helper for checking if a button was newly pressed during this update. The controllingPlayer parameter specifies which player to read input for. If this is null, it will accept input from any player. When a button press is detected, the output playerIndex reports which player pressed it.
|
|
IsNewKeyPress ( Keys key, PlayerIndex controllingPlayer, PlayerIndex &playerIndex ) : bool |
Helper for checking if a key was newly pressed during this update. The controllingPlayer parameter specifies which player to read input for. If this is null, it will accept input from any player. When a keypress is detected, the output playerIndex reports which player pressed it.
|
|
Update ( ) : void |
Reads the latest state user input.
|
public InputState ( ) : System.Collections.Generic | ||
return | System.Collections.Generic |
public IsButtonPressed ( Buttons button, PlayerIndex controllingPlayer, PlayerIndex &playerIndex ) : bool | ||
button | Buttons | |
controllingPlayer | PlayerIndex | |
playerIndex | PlayerIndex | |
return | bool |
public IsKeyPressed ( Keys key, PlayerIndex controllingPlayer, PlayerIndex &playerIndex ) : bool | ||
key | Keys | |
controllingPlayer | PlayerIndex | |
playerIndex | PlayerIndex | |
return | bool |
public IsNewButtonPress ( Buttons button, PlayerIndex controllingPlayer, PlayerIndex &playerIndex ) : bool | ||
button | Buttons | |
controllingPlayer | PlayerIndex | |
playerIndex | PlayerIndex | |
return | bool |
public IsNewKeyPress ( Keys key, PlayerIndex controllingPlayer, PlayerIndex &playerIndex ) : bool | ||
key | Keys | |
controllingPlayer | PlayerIndex | |
playerIndex | PlayerIndex | |
return | bool |
public GamePadState[],Microsoft.Xna.Framework.Input CurrentGamePadStates | ||
return | Microsoft.Xna.Framework.Input.GamePadState[] |
public KeyboardState[],Microsoft.Xna.Framework.Input CurrentKeyboardStates | ||
return | Microsoft.Xna.Framework.Input.KeyboardState[] |
public GamePadState[],Microsoft.Xna.Framework.Input LastGamePadStates | ||
return | Microsoft.Xna.Framework.Input.GamePadState[] |
public KeyboardState[],Microsoft.Xna.Framework.Input LastKeyboardStates | ||
return | Microsoft.Xna.Framework.Input.KeyboardState[] |