Table of Contents

Struct InputActionState

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

The state of one input action for one frame.

public readonly struct InputActionState
Inherited Members

Constructors

InputActionState(string, InputActionType, bool, bool, float, float, bool, InputDeviceSource)

Creates the state of an action. Input code creates these.

public InputActionState(string actionId, InputActionType actionType, bool isPressed, bool wasPressed, float value, float previousValue, bool isConsumed, InputDeviceSource device)

Parameters

actionId string
actionType InputActionType
isPressed bool
wasPressed bool
value float
previousValue float
isConsumed bool
device InputDeviceSource

Properties

ActionId

The id of the action, as it was registered.

public string ActionId { get; }

Property Value

string

ActionType

Whether the action is a button or an axis.

public InputActionType ActionType { get; }

Property Value

InputActionType

Device

The device the value came from.

public InputDeviceSource Device { get; }

Property Value

InputDeviceSource

IsConsumed

Whether the action has already been consumed this frame.

public bool IsConsumed { get; }

Property Value

bool

IsPressed

Whether the action is down this frame.

public bool IsPressed { get; }

Property Value

bool

PreviousValue

The action's value the frame before.

public float PreviousValue { get; }

Property Value

float

Value

The action's value this frame. A button gives 0 or 1; an axis gives its current amount.

public float Value { get; }

Property Value

float

WasJustPressed

Whether the action went down this frame.

public bool WasJustPressed { get; }

Property Value

bool

WasJustReleased

Whether the action went up this frame.

public bool WasJustReleased { get; }

Property Value

bool

WasPressed

Whether the action was down the frame before.

public bool WasPressed { get; }

Property Value

bool