Table of Contents

Class Gamepad

Namespace
BSGameLib.Game.Input
Assembly
BSGameLib.Game.dll

The connected gamepads. Its state is read through Instance.

public class Gamepad
Inheritance
Gamepad
Inherited Members

Properties

Instance

The gamepad manager. It is created the first time it is used.

public static Gamepad Instance { get; }

Property Value

Gamepad

Methods

ClearState()

Clears the button and axis state of every gamepad, so that nothing reads as pressed.

public void ClearState()

GetSnapshots()

Returns a snapshot of the state of each open gamepad.

public IEnumerable<Gamepad.GamepadSnapshot> GetSnapshots()

Returns

IEnumerable<Gamepad.GamepadSnapshot>

HandleEvent(in SDL_Event)

Applies one SDL gamepad event to the stored state: a connection, a disconnection, a button or an axis.

public void HandleEvent(in SDL_Event e)

Parameters

e SDL_Event

Initialize()

Opens every gamepad connected now.

public void Initialize()

Shutdown()

Closes every open gamepad.

public void Shutdown()