C# Class UHSampleGame.InputManagement.InputManager

Mostra file Open project: holtkampw/UH-Sample-XNA-Project Class Usage Examples

Public Methods

Method Description
AddInput ( InputAction action, Buttons button ) : void

Allows the action to be triggered by the key

AddInput ( InputAction action, Keys key ) : void

Allows the action to be triggered by the key

CheckAction ( InputAction action ) : bool

Checks if the action has is triggered

CheckAction ( InputAction action, PlayerIndex playerIndex ) : bool

Checks if the action has is triggered

CheckNewAction ( InputAction action ) : bool

Checks if the action has just been triggered

CheckNewAction ( InputAction action, PlayerIndex playerIndex ) : bool

Checks if the action has just been triggered

CheckNewReleaseAction ( InputAction action ) : bool
CheckNewReleaseAction ( InputAction action, PlayerIndex playerIndex ) : bool
CheckReleaseAction ( InputAction action ) : bool

Checks if the action has just been released

CheckReleaseAction ( InputAction action, PlayerIndex playerIndex ) : bool

Checks if the action has just been released

InputManager ( ) : System
Update ( ) : void

Updates previous and current input devices

Private Methods

Method Description
IsButtonPressed ( Buttons button, PlayerIndex playerIndex ) : bool
IsButtonReleased ( Buttons button, PlayerIndex playerIndex ) : bool
IsKeyPressed ( Keys key ) : bool
IsKeyReleased ( Keys key ) : bool
IsNewButtonPressed ( Buttons button, PlayerIndex playerIndex ) : bool
IsNewButtonReleased ( Buttons button, PlayerIndex playerIndex ) : bool
IsNewKeyPressed ( Keys key ) : bool
IsNewKeyReleased ( Keys key ) : bool

Method Details

AddInput() public method

Allows the action to be triggered by the key
public AddInput ( InputAction action, Buttons button ) : void
action InputAction The input action to be triggered
button Buttons The button to trigger the action
return void

AddInput() public method

Allows the action to be triggered by the key
public AddInput ( InputAction action, Keys key ) : void
action InputAction The input action to be triggered
key Keys The key to trigger the action
return void

CheckAction() public method

Checks if the action has is triggered
public CheckAction ( InputAction action ) : bool
action InputAction The action to check
return bool

CheckAction() public method

Checks if the action has is triggered
public CheckAction ( InputAction action, PlayerIndex playerIndex ) : bool
action InputAction The action to check
playerIndex PlayerIndex The player index to check
return bool

CheckNewAction() public method

Checks if the action has just been triggered
public CheckNewAction ( InputAction action ) : bool
action InputAction The action to check
return bool

CheckNewAction() public method

Checks if the action has just been triggered
public CheckNewAction ( InputAction action, PlayerIndex playerIndex ) : bool
action InputAction The action to check
playerIndex PlayerIndex The player index to check
return bool

CheckNewReleaseAction() public method

public CheckNewReleaseAction ( InputAction action ) : bool
action InputAction
return bool

CheckNewReleaseAction() public method

public CheckNewReleaseAction ( InputAction action, PlayerIndex playerIndex ) : bool
action InputAction
playerIndex PlayerIndex
return bool

CheckReleaseAction() public method

Checks if the action has just been released
public CheckReleaseAction ( InputAction action ) : bool
action InputAction The action to check
return bool

CheckReleaseAction() public method

Checks if the action has just been released
public CheckReleaseAction ( InputAction action, PlayerIndex playerIndex ) : bool
action InputAction The action to check
playerIndex PlayerIndex The player index to check
return bool

InputManager() public method

public InputManager ( ) : System
return System

Update() public method

Updates previous and current input devices
public Update ( ) : void
return void