StateMachineComponent

StateMachineComponent

Manages a set of state machines associated with an entity.

Constructor

new StateMachineComponent()

Methods

ensureCanReplaceComponent(sourceEntity)

validate if the current component support entity replacing. By default, it does not support.

Parameters:
Name Type Description
sourceEntity Entity
Throws:

Error if the entity contains this component is not replaceable

getMachineById(id) → {Machine}

Gets the state machine with the specified identifier.

Parameters:
Name Type Description
id string

The identifier of the machine which is to be returned.