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
-
objectKeyBindingSource
- Derived
Methods
GetMultiplier()
Scalar contribution when active. Use for analog inputs; 1.0 for plain keys.
public abstract float GetMultiplier()
Returns
IsHeld()
True while the binding is active this frame (key down and required modifiers match).
public abstract bool IsHeld()
Returns
ModifiersMatch(KeyModifiers)
protected static bool ModifiersMatch(KeyModifiers required)
Parameters
requiredKeyModifiers
Returns
WasPressedThisFrame()
True on the frame the binding first becomes active.
public abstract bool WasPressedThisFrame()