Interface IGamePadDevice
A gamepad is a game controller that has a fixed button mapping, stored in State
public interface IGamePadDevice : IInputDevice
- Inherited Members
- Extension Methods
Properties
CanChangeIndex
true
if the index of this gamepad can be changed
bool CanChangeIndex { get; }
Property Value
DownButtons
The gamepad buttons that are down
IReadOnlySet<GamePadButton> DownButtons { get; }
Property Value
Index
The index of the gamepad assigned by the input manager
int Index { get; set; }
Property Value
Remarks
If CanChangeIndex is false, this value can not be changed
PressedButtons
The gamepad buttons that have been pressed since the last frame
IReadOnlySet<GamePadButton> PressedButtons { get; }
Property Value
ProductId
Product Id of the device
Guid ProductId { get; }
Property Value
ReleasedButtons
The gamepad buttons that have been released since the last frame
IReadOnlySet<GamePadButton> ReleasedButtons { get; }
Property Value
State
The state of the gamepad
GamePadState State { get; }
Property Value
Methods
SetVibration(float, float, float, float)
Sets 4 vibration motors one the device or approximates the effect if less are supported
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
Events
IndexChanged
Raised if the index assigned to this gamepad changed
event EventHandler<GamePadIndexChangedEventArgs> IndexChanged