C# Class Indiefreaks.Xna.Input.InputManager.InputManager

Inheritance: Microsoft.Xna.Framework.DrawableGameComponent
Datei anzeigen Open project: Indiefreaks/igf

Protected Properties

Property Type Description
Player1 PlayerInput
Player2 PlayerInput
Player3 PlayerInput
Player4 PlayerInput

Private Properties

Property Type Description
DrawButton void
DrawStick void
OnAllInputDevicesDisconnected void
OnPlayerConnected void
OnPlayerDisconnected void
UpdateWindowsInput void
UpdateWindowsTouchInput void

Public Methods

Method Description
Draw ( GameTime gameTime ) : void
DrawButton ( VirtualGamePadButtonSkin buttonSkin, TouchMap touchMap, float value, float elapsedTime ) : void
GetPlayerInput ( PlayerIndex playerIndex ) : PlayerInput
InputManager ( Application application ) : System

Creates a new instance of the InputManager component and adds itself to the game's component collection as well as Service

Update ( GameTime gameTime ) : void

Updates the object and its contained resources.

Protected Methods

Method Description
LoadContent ( ) : void

Private Methods

Method Description
DrawButton ( VirtualGamePadButtonSkin buttonSkin, TouchMap touchMap, Button button, float elapsedTime ) : void
DrawStick ( VirtualGamePadStickSkin stickSkin, TouchMap touchMap, float elapsedTime ) : void
OnAllInputDevicesDisconnected ( ) : void

Called when no input devices are connected to the machine.

OnPlayerConnected ( object sender, EventArgs e ) : void

Called when an input device gets connected to the machine.

OnPlayerDisconnected ( object sender, EventArgs e ) : void

Called when an input device gets disconnected to the machine.

UpdateWindowsInput ( long tick ) : void
UpdateWindowsTouchInput ( ) : void

Method Details

Draw() public method

public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

DrawButton() public method

public DrawButton ( VirtualGamePadButtonSkin buttonSkin, TouchMap touchMap, float value, float elapsedTime ) : void
buttonSkin VirtualGamePadButtonSkin
touchMap TouchMap
value float
elapsedTime float
return void

GetPlayerInput() public method

public GetPlayerInput ( PlayerIndex playerIndex ) : PlayerInput
playerIndex PlayerIndex
return PlayerInput

InputManager() public method

Creates a new instance of the InputManager component and adds itself to the game's component collection as well as Service
public InputManager ( Application application ) : System
application Application The game instance
return System

LoadContent() protected method

protected LoadContent ( ) : void
return void

Update() public method

Updates the object and its contained resources.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

Property Details

Player1 protected_oe property

protected PlayerInput,Indiefreaks.Xna.Input Player1
return PlayerInput

Player2 protected_oe property

protected PlayerInput,Indiefreaks.Xna.Input Player2
return PlayerInput

Player3 protected_oe property

protected PlayerInput,Indiefreaks.Xna.Input Player3
return PlayerInput

Player4 protected_oe property

protected PlayerInput,Indiefreaks.Xna.Input Player4
return PlayerInput