C# Class SuperCaissiere.Engine.Input.JoystickManager

This class analyzes and manages joystick/joypad devices using JoystickReader
Show file Open project: valryon/super-caissiere Class Usage Examples

Public Properties

Property Type Description
MaxJoystickNumber int
MiddleAxisValue int

Public Methods

Method Description
GetJoyState ( int id ) : JoystickState

Get button and axis state for a joypad (SHOULD BE CONNECTED !!!)

JoystickManager ( ) : System.Diagnostics

Initialize the manager

Scan ( ) : void

Update devices status

Private Methods

Method Description
ScanID ( int id ) : void

Update a precise device status

Method Details

GetJoyState() public method

Get button and axis state for a joypad (SHOULD BE CONNECTED !!!)
public GetJoyState ( int id ) : JoystickState
id int
return JoystickState

JoystickManager() public method

Initialize the manager
public JoystickManager ( ) : System.Diagnostics
return System.Diagnostics

Scan() public method

Update devices status
public Scan ( ) : void
return void

Property Details

MaxJoystickNumber public static property

Arbitrary decide the maximum number of joystick to test. But who the hell have more than 4 joysticks connected to USB ports simultanely ?!
public static int MaxJoystickNumber
return int

MiddleAxisValue public static property

The value of a joystick axis when centered
public static int MiddleAxisValue
return int