C# Class Sharpex2D.Input.Implementation.XInput.Gamepad

Inheritance: IGamepad
Mostra file Open project: ThuCommix/Sharpex2D Class Usage Examples

Public Methods

Method Description
GetCapabilities ( ) : XInputCapabilities

Gets the Capabilities.

GetState ( ) : GamepadState

Gets the State.

Initialize ( ) : void

Initializes the Device.

Retrieve ( int index ) : Gamepad

Retrieves the XBoxController.

ToString ( ) : string

Converts the object to string.

Update ( GameTime gameTime ) : void

Updates the object.

Vibrate ( float leftMotor, float rightMotor, float length ) : void

Vibrates the controller.

Private Methods

Method Description
Gamepad ( ) : System

Initializes a new Gamepad class.

Gamepad ( int playerIndex ) : System

Initializes a new Gamepad class.

UpdateBatteryState ( ) : void

Updates the BatteryState.

Vibrate ( XInputVibration strength, float length ) : void

Vibrates the controller.

Method Details

GetCapabilities() public method

Gets the Capabilities.
public GetCapabilities ( ) : XInputCapabilities
return XInputCapabilities

GetState() public method

Gets the State.
public GetState ( ) : GamepadState
return GamepadState

Initialize() public method

Initializes the Device.
public Initialize ( ) : void
return void

Retrieve() public static method

Retrieves the XBoxController.
public static Retrieve ( int index ) : Gamepad
index int The Index.
return Gamepad

ToString() public method

Converts the object to string.
public ToString ( ) : string
return string

Update() public method

Updates the object.
public Update ( GameTime gameTime ) : void
gameTime GameTime The GameTime.
return void

Vibrate() public method

Vibrates the controller.
public Vibrate ( float leftMotor, float rightMotor, float length ) : void
leftMotor float The LeftMotor.
rightMotor float The RightMotor.
length float The Length.
return void