Skip to content

InputAction Class

A named logical input action with one or more physical bindings. Supports runtime rebinding. Query methods check all bindings and return the first positive match (for digital) or the largest magnitude (for analog).

public sealed class InputAction

Inheritance System.Object → InputAction

Remarks

Thread-safe: the binding list is guarded by Brine2D.Input.InputAction._bindingsLock.

Methods
IsDown(IInputContext) Returns true if any binding is currently held.
IsPressed(IInputContext) Returns true if any binding was pressed this frame.
IsReleased(IInputContext) Returns true if any binding was released this frame.
ReadValue(IInputContext) Returns the value with the largest absolute magnitude across all bindings.
ReadVector2(IInputContext, InputAction) Reads this action paired with another as a System.Numerics.Vector2 (this action supplies X, yAction supplies Y).