Class Gamepad
- Namespace
- SimulationFramework.Input
- Assembly
- SimulationFramework.dll
Provides gamepad input to the application.
public static class Gamepad
- Inheritance
-
Gamepad
- Inherited Members
Properties
HeldButtons
A collection of all buttons which are pressed this frame. A button is only considered pressed on the first frame that it is held.
public static IEnumerable<GamepadButton> HeldButtons { get; }
Property Value
LeftJoystick
The left joystick value of the gamepad.
public static Vector2 LeftJoystick { get; }
Property Value
LeftTrigger
The left trigger value of the gamepad.
public static float LeftTrigger { get; }
Property Value
PressedButtons
A collection of all buttons which are pressed this frame. A button is only considered pressed on the first frame that it is held.
public static IEnumerable<GamepadButton> PressedButtons { get; }
Property Value
ReleasedButtons
A collection of all buttons which are pressed this frame. A button is only considered released on the first frame that it is not held.
public static IEnumerable<GamepadButton> ReleasedButtons { get; }
Property Value
RightJoystick
The right joystick value of the gamepad.
public static Vector2 RightJoystick { get; }
Property Value
RightTrigger
The right trigger value of the gamepad.
public static float RightTrigger { get; }
Property Value
VibrationStrength
Gets or sets the current strength of the gamepads's haptic feedback, between 0 (no vibration) and 1 (max vibration).
public static float VibrationStrength { get; set; }
Property Value
Methods
IsButtonDown(GamepadButton)
public static bool IsButtonDown(GamepadButton button)
Parameters
button
GamepadButton
Returns
IsButtonPressed(GamepadButton)
public static bool IsButtonPressed(GamepadButton button)
Parameters
button
GamepadButton
Returns
IsButtonReleased(GamepadButton)
public static bool IsButtonReleased(GamepadButton button)
Parameters
button
GamepadButton
Returns
Events
ButtonPressed
Invoked when a button is pressed.
public static event GamepadButtonEvent ButtonPressed
Event Type
ButtonReleased
Invoked when a button is released.
public static event GamepadButtonEvent ButtonReleased