C# Class F1Publisher.DataGenerators.DirectInputManager

Inheritance: ICarControlsDataGenerator, IDisposable
Mostra file Open project: pushtechnology/blog-steering-wheel Class Usage Examples

Public Methods

Method Description
ButtonState ( CarButtons button ) : bool
DirectInputManager ( ) : System
Dispose ( ) : void
Update ( ) : void

Protected Methods

Method Description
OnAccelerationValueChanged ( FloatingPointScalarEventArgs e ) : void
OnBrakingValueChanged ( FloatingPointScalarEventArgs e ) : void
OnButtonStateChanged ( CarButtonEventArgs e ) : void
OnSteeringValueChanged ( FloatingPointScalarEventArgs e ) : void

Private Methods

Method Description
CreateCarButtonEventArgs ( int i, bool on ) : CarButtonEventArgs

This method will only return an object if the button index is mapped for the current device. Otherwise, it will return null.

FindAttachedDevice ( DirectInput directInput, DeviceType deviceType ) : DeviceInstance
GetConsoleWindow ( ) : IntPtr
RangePedal ( int rawValue ) : double
RangeSteering ( int rawValue ) : double
UpdateAcceleration ( JoystickState joystickState ) : void
UpdateBraking ( JoystickState joystickState ) : void
UpdateButtons ( JoystickState joystickState ) : void
UpdateSteering ( JoystickState joystickState ) : void

Method Details

ButtonState() public method

public ButtonState ( CarButtons button ) : bool
button CarButtons
return bool

DirectInputManager() public method

public DirectInputManager ( ) : System
return System

Dispose() public method

public Dispose ( ) : void
return void

OnAccelerationValueChanged() protected method

protected OnAccelerationValueChanged ( FloatingPointScalarEventArgs e ) : void
e FloatingPointScalarEventArgs
return void

OnBrakingValueChanged() protected method

protected OnBrakingValueChanged ( FloatingPointScalarEventArgs e ) : void
e FloatingPointScalarEventArgs
return void

OnButtonStateChanged() protected method

protected OnButtonStateChanged ( CarButtonEventArgs e ) : void
e CarButtonEventArgs
return void

OnSteeringValueChanged() protected method

protected OnSteeringValueChanged ( FloatingPointScalarEventArgs e ) : void
e FloatingPointScalarEventArgs
return void

Update() public method

public Update ( ) : void
return void