Scripting API

Scripting API

InputActionState

Struct in Abyss.Core, from Abyss.Core.

One action of one player's this frame, as the engine works it out from every device.

public readonly struct InputActionState

Remarks

Laid out as abyss_core::input::actions::ActionState is, which is checked at startup.

Properties

Value

public float Value { get; }

Its value: how far a button is pressed, zero to one; an axis's, negative one to one; a vector's x.

Vector

public Vector2 Vector { get; }

A vector's value, up positive; for a button or an axis, its value and zero.

Held

public bool Held { get; }

Whether it is held: a button pressed past halfway, an axis or vector off zero.

Pressed

public bool Pressed { get; }

Whether it went from not held to held this frame.

Released

public bool Released { get; }

Whether it went from held to not held this frame.

HeldFor

public float HeldFor { get; }

Seconds since it was pressed, by the game's clock: zero the frame it is pressed, and on the frame it is let go, how long it was held.

HeldBefore

public float HeldBefore { get; }

What InputActionState.HeldFor was the frame before: zero where it was not held.