Table of Contents

Class KeyBindingSource

Namespace
Goehler.OrbitalCam
Assembly
Goehler.OrbitalCam.Runtime.dll

Polymorphic source of a keyboard binding result. Subclasses define how the binding evaluates; the keyboard adapter only depends on this contract, so swapping SingleKeyBinding for an array-of-bindings type later is a non-breaking change.

[Serializable]
public abstract class KeyBindingSource
Inheritance
object
KeyBindingSource
Derived

Methods

GetMultiplier()

Scalar contribution when active. Use for analog inputs; 1.0 for plain keys.

public abstract float GetMultiplier()

Returns

float

IsHeld()

True while the binding is active this frame (key down and required modifiers match).

public abstract bool IsHeld()

Returns

bool

ModifiersMatch(KeyModifiers)

protected static bool ModifiersMatch(KeyModifiers required)

Parameters

required KeyModifiers

Returns

bool

WasPressedThisFrame()

True on the frame the binding first becomes active.

public abstract bool WasPressedThisFrame()

Returns

bool