Class GamePadSimulated
public class GamePadSimulated : GamePadDeviceBase, IGamePadDevice, IInputDevice
- Inheritance
-
GamePadSimulated
- Implements
- Inherited Members
- Extension Methods
Constructors
GamePadSimulated(InputSourceSimulated)
public GamePadSimulated(InputSourceSimulated source)
Parameters
source
InputSourceSimulated
Properties
Id
The unique identifier of this device
public override Guid Id { get; }
Property Value
Name
The name of the device
public override string Name { get; }
Property Value
ProductId
Product Id of the device
public override Guid ProductId { get; }
Property Value
Source
The input source the device belongs to.
public override IInputSource Source { get; }
Property Value
State
The state of the gamepad
public override GamePadState State { get; }
Property Value
Methods
SetAxis(GamePadAxis, float)
public void SetAxis(GamePadAxis axis, float value)
Parameters
axis
GamePadAxisvalue
float
SetButton(GamePadButton, bool)
public void SetButton(GamePadButton button, bool state)
Parameters
button
GamePadButtonstate
bool
SetVibration(float, float, float, float)
Sets 4 vibration motors one the device or approximates the effect if less are supported
public override void SetVibration(float smallLeft, float smallRight, float largeLeft, float largeRight)
Parameters
smallLeft
floatThe small left side motor
smallRight
floatThe small right side motor
largeLeft
floatThe large left side motor
largeRight
floatThe large right side motor
Remarks
Values range from 0 to 1, where 0 is off and 1 is maximum vibration
Update(List<InputEvent>)
Updates the input device, filling the list inputEvents
with input events that were generated by this device this frame
public override void Update(List<InputEvent> inputEvents)
Parameters
inputEvents
List<InputEvent>A list that gets filled with input events that were generated since the last frame
Remarks
Input devices are always updated after their respective input source