Table of Contents

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

IEnumerable<GamepadButton>

LeftJoystick

The left joystick value of the gamepad.

public static Vector2 LeftJoystick { get; }

Property Value

Vector2

LeftTrigger

The left trigger value of the gamepad.

public static float LeftTrigger { get; }

Property Value

float

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

IEnumerable<GamepadButton>

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

IEnumerable<GamepadButton>

RightJoystick

The right joystick value of the gamepad.

public static Vector2 RightJoystick { get; }

Property Value

Vector2

RightTrigger

The right trigger value of the gamepad.

public static float RightTrigger { get; }

Property Value

float

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

float

Methods

IsButtonDown(GamepadButton)

Returns true if the provided button is down, otherwise false.

public static bool IsButtonDown(GamepadButton button)

Parameters

button GamepadButton

Returns

bool

IsButtonPressed(GamepadButton)

Returns true if the provided button was pressed this frame, otherwise false.

public static bool IsButtonPressed(GamepadButton button)

Parameters

button GamepadButton

Returns

bool

IsButtonReleased(GamepadButton)

Returns true if the provided button was released this frame, otherwise false.

public static bool IsButtonReleased(GamepadButton button)

Parameters

button GamepadButton

Returns

bool

Events

ButtonPressed

Invoked when a button is pressed.

public static event GamepadButtonEvent ButtonPressed

Event Type

GamepadButtonEvent

ButtonReleased

Invoked when a button is released.

public static event GamepadButtonEvent ButtonReleased

Event Type

GamepadButtonEvent