Inherits Mindshifter.IInputManager.
Inheritance diagram for Mindshifter.InputManager:
Public Member Functions | |
InputManager (Game game) | |
Creates a new instance of Input. | |
void | PushActionMap (ActionMap map) |
Pushes an ActionMap onto the action map stack. | |
ActionMap | PopActionMap () |
Pops the topmost ActionMap from the ActionMap stack. | |
override void | Update (GameTime gameTime) |
Updates the keyboard and mouse states. | |
bool | Key (XI.Keys key) |
Returns true if the specified keyboard key is pressed. | |
bool | KeyDown (XI.Keys key) |
Returns true if a key down event occurred for the specified key. | |
bool | KeyUp (XI.Keys key) |
Returns true if a key up event occurred for the specified key. | |
bool | MouseButton (MouseButtons button) |
Returns true if the specified mouse button is pressed. | |
bool | MouseDown (MouseButtons button) |
Returns true if a mouse down event occurred for the specified mouse button. | |
bool | MouseUp (MouseButtons button) |
Returns true if a mouse up event occurred for the specified mouse button. | |
Static Public Member Functions | |
static void | Initialize (Game game) |
Initializes the input manager, adding an InputManager instance to the specified game's component set and adding the IInputManager interface to the game's services. | |
Properties | |
XI.KeyboardState | Keyboard [get] |
Gets the current keyboard state. | |
XI.KeyboardState | KeyboardPrevious [get] |
Gets the previous keyboard state (shorthand accessor). | |
XI.MouseState | Mouse [get] |
Gets the current mouse state. | |
XI.MouseState | MousePrevious [get] |
Private shorthand accessor. | |
int | DX [get] |
Gets the change in the mouse x position since input was last updated. | |
int | DY [get] |
Gets the change in the mouse y position since input was last updated. | |
int | DZ [get] |
Gets the change in the mouse scroll wheel position since input was last updated. | |
int | X [get] |
Gets the x position of the mouse. | |
int | Y [get] |
Gets the y position of the mouse. | |
int | Z [get] |
Gets the current value of the mouse scroll wheel. | |
ActionMap | ActionMap [get] |
Gets the active ActionMap. | |
bool | this [XI.Keys key] [get] |
Returns true if the specified mouse button is pressed. | |
Private Types | |
enum | InputState { Current, Previous } |
Defines the state of an input set, either current or previous. More... | |
Private Attributes | |
Dictionary< InputState, XI.KeyboardState > | mKeyboard |
Dictionary< InputState, XI.MouseState > | mMouse |
Stack< ActionMap > | mActionMaps |
enum Mindshifter::InputManager::InputState [private] |
Mindshifter.InputManager.InputManager | ( | Game | game | ) |
Creates a new instance of Input.
game | The XNA Game instance |
static void Mindshifter.InputManager.Initialize | ( | Game | game | ) | [static] |
Initializes the input manager, adding an InputManager instance to the specified game's component set and adding the IInputManager interface to the game's services.
game | The game using the input manager |
void Mindshifter.InputManager.PushActionMap | ( | ActionMap | map | ) |
ActionMap Mindshifter.InputManager.PopActionMap | ( | ) |
override void Mindshifter.InputManager.Update | ( | GameTime | gameTime | ) |
Updates the keyboard and mouse states.
gameTime | Current XNA game time |
bool Mindshifter.InputManager.Key | ( | XI.Keys | key | ) |
Returns true if the specified keyboard key is pressed.
key | The key to test for a key pressed state |
bool Mindshifter.InputManager.KeyDown | ( | XI.Keys | key | ) |
Returns true if a key down event occurred for the specified key.
key | The key to test for a key down event |
bool Mindshifter.InputManager.KeyUp | ( | XI.Keys | key | ) |
Returns true if a key up event occurred for the specified key.
key | The key to test for a key up event |
bool Mindshifter.InputManager.MouseButton | ( | MouseButtons | button | ) |
Returns true if the specified mouse button is pressed.
button | The mouse button to test for a button pressed state |
Implements Mindshifter.IInputManager.
bool Mindshifter.InputManager.MouseDown | ( | MouseButtons | button | ) |
Returns true if a mouse down event occurred for the specified mouse button.
button | The mouse button to test for a mouse down event |
Implements Mindshifter.IInputManager.
bool Mindshifter.InputManager.MouseUp | ( | MouseButtons | button | ) |
Returns true if a mouse up event occurred for the specified mouse button.
button | The mouse button to test for a mouse up event |
Implements Mindshifter.IInputManager.
Dictionary<InputState, XI.KeyboardState> Mindshifter.InputManager.mKeyboard [private] |
Dictionary<InputState, XI.MouseState> Mindshifter.InputManager.mMouse [private] |
Stack<ActionMap> Mindshifter.InputManager.mActionMaps [private] |
XI.KeyboardState Mindshifter.InputManager.Keyboard [get] |
XI.KeyboardState Mindshifter.InputManager.KeyboardPrevious [get, private] |
Gets the previous keyboard state (shorthand accessor).
XI.MouseState Mindshifter.InputManager.Mouse [get] |
XI.MouseState Mindshifter.InputManager.MousePrevious [get, private] |
Private shorthand accessor.
int Mindshifter.InputManager.DX [get] |
Gets the change in the mouse x position since input was last updated.
Implements Mindshifter.IInputManager.
int Mindshifter.InputManager.DY [get] |
Gets the change in the mouse y position since input was last updated.
Implements Mindshifter.IInputManager.
int Mindshifter.InputManager.DZ [get] |
Gets the change in the mouse scroll wheel position since input was last updated.
Implements Mindshifter.IInputManager.
int Mindshifter.InputManager.X [get] |
int Mindshifter.InputManager.Y [get] |
int Mindshifter.InputManager.Z [get] |
ActionMap Mindshifter.InputManager.ActionMap [get] |
bool Mindshifter.InputManager::this | ( | ) | [get] |
Returns true if the specified mouse button is pressed.
key | The key to test for a key pressed state |
Implements Mindshifter.IInputManager.