Class: TriggerAction
Defined in: input/actions/trigger-action.ts:8
An action that represents a trigger input, such as pressing a button or key.
Implements
InputActionResettable
Constructors
Constructor
new TriggerAction(
name,inputGroup):TriggerAction
Defined in: input/actions/trigger-action.ts:22
Creates a new TriggerAction.
Parameters
name
string
The name of the action.
inputGroup
string
The input group this action belongs to.
Returns
TriggerAction
Properties
inputGroup
inputGroup:
string
Defined in: input/actions/trigger-action.ts:14
The input group this action belongs to.
Implementation of
InputAction.inputGroup
name
readonlyname:string
Defined in: input/actions/trigger-action.ts:9
The name of the action.
Implementation of
InputAction.name
triggerEvent
readonlytriggerEvent:ForgeEvent
Defined in: input/actions/trigger-action.ts:12
Event that is raised when the action is triggered.
Accessors
isTriggered
Get Signature
get isTriggered():
boolean
Defined in: input/actions/trigger-action.ts:43
Gets whether the action is currently triggered.
Returns
boolean
Methods
reset()
reset():
void
Defined in: input/actions/trigger-action.ts:38
Resets the action to not triggered.
Returns
void
Implementation of
trigger()
trigger():
void
Defined in: input/actions/trigger-action.ts:32
Marks the action as triggered and raises the trigger event.
Returns
void