Table of Contents

Class DeviceInputManager

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

Holds the keyboard and gamepad state for this frame and the one before. The input system polls it once a frame.

public sealed class DeviceInputManager
Inheritance
DeviceInputManager
Inherited Members

Properties

CurrentGamepads

The gamepads polled this frame, by instance id.

public IReadOnlyDictionary<int, Gamepad.GamepadSnapshot> CurrentGamepads { get; }

Property Value

IReadOnlyDictionary<int, Gamepad.GamepadSnapshot>

CurrentKeyboard

The keyboard state polled this frame.

public Keyboard.Snapshot CurrentKeyboard { get; }

Property Value

Keyboard.Snapshot

PreviousGamepads

The gamepads polled the frame before, by instance id.

public IReadOnlyDictionary<int, Gamepad.GamepadSnapshot> PreviousGamepads { get; }

Property Value

IReadOnlyDictionary<int, Gamepad.GamepadSnapshot>

PreviousKeyboard

The keyboard state polled the frame before.

public Keyboard.Snapshot PreviousKeyboard { get; }

Property Value

Keyboard.Snapshot

Methods

ClearHardwareState()

Clears the keyboard and gamepad state, and makes the next Poll() start again.

public void ClearHardwareState()

Poll()

Reads the keyboard and the gamepads. The first call sets the previous state equal to the current one, so nothing counts as just pressed.

public void Poll()