C# Class PG515.Input.InputManager

Implements the IInputService interface and the GameComponent class. For information about functions, read comments in IInputService.
Inheritance: Microsoft.Xna.Framework.GameComponent, IInputService
Afficher le fichier Open project: Westerdals/PG2200LectureCode2013 Class Usage Examples

Méthodes publiques

Méthode Description
InputManager ( Microsoft.Xna.Framework.Game game ) : System
IsButtonDown ( Buttons button, PlayerIndex playerIndex ) : bool
IsButtonDown ( Buttons button, int playerIndex ) : bool

Same as IsButtonDown(Buttons, playerIndex), uses the int(-1) directly (faster than playerIndex)

IsButtonDown ( MouseButtons button ) : bool
IsButtonPressed ( Buttons button, PlayerIndex playerIndex ) : bool
IsButtonPressed ( Buttons button, int playerIndex ) : bool

Same as IsButtonPressed(Buttons, playerIndex), uses the int(-1) directly (faster than playerIndex)

IsButtonPressed ( MouseButtons button ) : bool
IsButtonReleased ( MouseButtons button ) : bool
IsButtonUp ( Buttons button, PlayerIndex playerIndex ) : bool
IsButtonUp ( Buttons button, int playerIndex ) : bool

Same as IsButtonUp(Buttons, playerIndex), uses the int(-1) directly (faster than playerIndex)

IsButtonUp ( MouseButtons button ) : bool
IsKeyDown ( Keys key ) : bool
IsKeyPressed ( Keys key ) : bool
IsKeyReleased ( Keys key ) : bool
IsKeyUp ( Keys key ) : bool
Update ( GameTime gameTime ) : void

Method Details

InputManager() public méthode

public InputManager ( Microsoft.Xna.Framework.Game game ) : System
game Microsoft.Xna.Framework.Game
Résultat System

IsButtonDown() public méthode

public IsButtonDown ( Buttons button, PlayerIndex playerIndex ) : bool
button Buttons
playerIndex PlayerIndex
Résultat bool

IsButtonDown() public méthode

Same as IsButtonDown(Buttons, playerIndex), uses the int(-1) directly (faster than playerIndex)
public IsButtonDown ( Buttons button, int playerIndex ) : bool
button Buttons the button to check
playerIndex int Index of the player (1-4)
Résultat bool

IsButtonDown() public méthode

public IsButtonDown ( MouseButtons button ) : bool
button MouseButtons
Résultat bool

IsButtonPressed() public méthode

public IsButtonPressed ( Buttons button, PlayerIndex playerIndex ) : bool
button Buttons
playerIndex PlayerIndex
Résultat bool

IsButtonPressed() public méthode

Same as IsButtonPressed(Buttons, playerIndex), uses the int(-1) directly (faster than playerIndex)
public IsButtonPressed ( Buttons button, int playerIndex ) : bool
button Buttons the button to check
playerIndex int Index of the player (1-4)
Résultat bool

IsButtonPressed() public méthode

public IsButtonPressed ( MouseButtons button ) : bool
button MouseButtons
Résultat bool

IsButtonReleased() public méthode

public IsButtonReleased ( MouseButtons button ) : bool
button MouseButtons
Résultat bool

IsButtonUp() public méthode

public IsButtonUp ( Buttons button, PlayerIndex playerIndex ) : bool
button Buttons
playerIndex PlayerIndex
Résultat bool

IsButtonUp() public méthode

Same as IsButtonUp(Buttons, playerIndex), uses the int(-1) directly (faster than playerIndex)
public IsButtonUp ( Buttons button, int playerIndex ) : bool
button Buttons the button to check
playerIndex int Index of the player (1-4)
Résultat bool

IsButtonUp() public méthode

public IsButtonUp ( MouseButtons button ) : bool
button MouseButtons
Résultat bool

IsKeyDown() public méthode

public IsKeyDown ( Keys key ) : bool
key Keys
Résultat bool

IsKeyPressed() public méthode

public IsKeyPressed ( Keys key ) : bool
key Keys
Résultat bool

IsKeyReleased() public méthode

public IsKeyReleased ( Keys key ) : bool
key Keys
Résultat bool

IsKeyUp() public méthode

public IsKeyUp ( Keys key ) : bool
key Keys
Résultat bool

Update() public méthode

public Update ( GameTime gameTime ) : void
gameTime GameTime
Résultat void