Skip to main content

Class: HoldAction

Defined in: input/actions/hold-action.ts:7

An action that represents a hold input, such as holding down a button or key.

Implements​

Constructors​

Constructor​

new HoldAction(name, inputGroup?): HoldAction

Defined in: input/actions/hold-action.ts:23

Creates a new HoldAction.

Parameters​

name​

string

The name of the action.

inputGroup?​

string

The input group this action belongs to.

Returns​

HoldAction

Properties​

holdEndEvent​

readonly holdEndEvent: ForgeEvent

Defined in: input/actions/hold-action.ts:13

Event that is raised when the hold ends.


holdStartEvent​

readonly holdStartEvent: ForgeEvent

Defined in: input/actions/hold-action.ts:11

Event that is raised when the hold starts.


inputGroup​

inputGroup: string

Defined in: input/actions/hold-action.ts:15

The input group this action belongs to.

Implementation of​

InputAction.inputGroup


name​

readonly name: string

Defined in: input/actions/hold-action.ts:8

The name of the action.

Implementation of​

InputAction.name

Accessors​

isHeld​

Get Signature​

get isHeld(): boolean

Defined in: input/actions/hold-action.ts:45

Gets whether the action is currently being held.

Returns​

boolean

Methods​

endHold()​

endHold(): void

Defined in: input/actions/hold-action.ts:39

Marks the action as not being held and raises the hold end event.

Returns​

void


startHold()​

startHold(): void

Defined in: input/actions/hold-action.ts:33

Marks the action as being held and raises the hold start event.

Returns​

void