Skip to main content

Interface: StateContext

Defined in: src/interaction/StateMachine.ts:38

Context passed to a state onEnter / onExit action and to a per-transition action. It names the states involved and carries the delta time of the StateMachine.update call that caused the transition.

Properties​

dt​

dt: number

Defined in: src/interaction/StateMachine.ts:46

Delta time (seconds) of the update that triggered the transition.


from​

from: string

Defined in: src/interaction/StateMachine.ts:42

The state being left, or null when entering the initial state.


machine​

machine: StateMachine

Defined in: src/interaction/StateMachine.ts:40

The machine that performed the transition.


to​

to: string

Defined in: src/interaction/StateMachine.ts:44

The state being entered.