Property | Type | Description | |
---|---|---|---|
CurrentGamePadStates | Microsoft.Xna.Framework.Input.GamePadState[] | ||
CurrentKeyboardStates | Microsoft.Xna.Framework.Input.KeyboardState[] | ||
CurrentMousePosition | |||
CurrentMouseState | Microsoft.Xna.Framework.Input.MouseState | ||
GamePadWasConnected | bool[] | ||
LastGamePadStates | Microsoft.Xna.Framework.Input.GamePadState[] | ||
LastKeyboardStates | Microsoft.Xna.Framework.Input.KeyboardState[] | ||
LastMouseState | Microsoft.Xna.Framework.Input.MouseState |
Method | Description | |
---|---|---|
InputState ( ) : Microsoft.Xna.Framework |
Constructs a new input state.
|
|
IsMenuCancel ( PlayerIndex controllingPlayer, PlayerIndex &playerIndex ) : bool |
Checks for a "menu cancel" input action. The controllingPlayer parameter specifies which player to read input for. If this is null, it will accept input from any player. When the action is detected, the output playerIndex reports which player pressed it.
|
|
IsMenuDown ( PlayerIndex controllingPlayer ) : bool |
Checks for a "menu down" input action. The controllingPlayer parameter specifies which player to read input for. If this is null, it will accept input from any player.
|
|
IsMenuLeft ( PlayerIndex controllingPlayer ) : bool |
Checks for a "menu left" input action. The controllingPlayer parameter specifies which player to read input for. If this is null, it will accept input from any player.
|
|
IsMenuRight ( PlayerIndex controllingPlayer ) : bool |
Checks for a "menu right" input action. The controllingPlayer parameter specifies which player to read input for. If this is null, it will accept input from any player.
|
|
IsMenuSelect ( PlayerIndex controllingPlayer, PlayerIndex &playerIndex ) : bool |
Checks for a "menu select" input action. The controllingPlayer parameter specifies which player to read input for. If this is null, it will accept input from any player. When the action is detected, the output playerIndex reports which player pressed it.
|
|
IsMenuUp ( PlayerIndex controllingPlayer ) : bool |
Checks for a "menu up" input action. The controllingPlayer parameter specifies which player to read input for. If this is null, it will accept input from any player.
|
|
IsMouseMoved ( ) : bool |
Helper for checking if the position of the mouse has changed during this update.
|
|
IsNewButtonPress ( Buttons button ) : bool |
Helper for checking if a button was newly pressed during this update. This method is designed for use in one-player games and only checks the gamepad for player one.
|
|
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 ) : bool |
Helper for checking if a key was newly pressed during this update. This method is designed for use in PC games where there is only one keyboard.
|
|
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.
|
|
IsNewMouseButtonPress ( MouseButtons button ) : bool |
Helper for checking if a mouse button was newly pressed during this update. No controlling player parameter is required because there is only one mouse.
|
|
IsPauseGame ( PlayerIndex controllingPlayer ) : bool |
Checks for a "pause the game" input action. The controllingPlayer parameter specifies which player to read input for. If this is null, it will accept input from any player.
|
|
Update ( ) : void |
Reads the latest state of the keyboard and gamepad.
|
public InputState ( ) : Microsoft.Xna.Framework | ||
return | Microsoft.Xna.Framework |
public IsMenuCancel ( PlayerIndex controllingPlayer, PlayerIndex &playerIndex ) : bool | ||
controllingPlayer | PlayerIndex | |
playerIndex | PlayerIndex | |
return | bool |
public IsMenuDown ( PlayerIndex controllingPlayer ) : bool | ||
controllingPlayer | PlayerIndex | |
return | bool |
public IsMenuLeft ( PlayerIndex controllingPlayer ) : bool | ||
controllingPlayer | PlayerIndex | |
return | bool |
public IsMenuRight ( PlayerIndex controllingPlayer ) : bool | ||
controllingPlayer | PlayerIndex | |
return | bool |
public IsMenuSelect ( PlayerIndex controllingPlayer, PlayerIndex &playerIndex ) : bool | ||
controllingPlayer | PlayerIndex | |
playerIndex | PlayerIndex | |
return | bool |
public IsMenuUp ( PlayerIndex controllingPlayer ) : bool | ||
controllingPlayer | PlayerIndex | |
return | bool |
public IsNewButtonPress ( Buttons button ) : bool | ||
button | Buttons | |
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 IsNewMouseButtonPress ( MouseButtons button ) : bool | ||
button | MouseButtons | |
return | bool |
public IsPauseGame ( PlayerIndex controllingPlayer ) : bool | ||
controllingPlayer | 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 Vector2,Microsoft.Xna.Framework CurrentMousePosition | ||
return |
public MouseState,Microsoft.Xna.Framework.Input CurrentMouseState | ||
return | Microsoft.Xna.Framework.Input.MouseState |
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[] |