[ view source ]
class StateMachineComponent<T, E>
package ceramic
extends StateMachineImpl › StateMachineBase › Entity
@:build(ceramic.macros.ComponentMacro.build())@:autoBuild(ceramic.macros.ComponentMacro.build())@:build(tracker.macros.ObservableMacro.build())@:autoBuild(tracker.macros.ObservableMacro.build())@:build(ceramic.macros.EntityMacro.buildForCompletion())@:autoBuild(ceramic.macros.EntityMacro.buildForCompletion())@:build(tracker.macros.EventsMacro.build())@:autoBuild(tracker.macros.EventsMacro.build())Available on all targets
Constructor
Variables
Inherited Events
Defined by StateMachineImpl
@:dox(show)observedDirty(instance:StateMachineBase, fromSerializedField:Bool):Void
Event when any observable value as changed on this instance.
Inherited Variables
Defined by StateMachineImpl
@:value(StateMachineBase.NO_STATE)read onlynextState:T = StateMachineBase.NO_STATE
When transitioning from one state to another, this will be set to the next incoming state
Defined by StateMachineBase
@:value(false)observedDirty:Bool = false
@:value(false)paused:Bool = false
When set to true
, the state machine will stop calling update()
on current state and related.
@:value(true)autoUpdate:Bool = true
@:value(false)read onlystateDefined:Bool = false
@:value(false)read onlynextStateDefined:Bool = false
@:value(false)locked:Bool = false
If set to true
, changing state will be forbidden and trigger an error.
@:value(null)read onlyinitializerName:String = null
Defined by Entity
@editablecomponents:ReadOnlyMap<String, Component>
Public components mapping. Contain components
created separately with component()
or macro-based components as well.
Inherited Methods
Defined by StateMachineImpl
Defined by StateMachineBase
Defined by Entity
autorun(run:() ‑> Void, ?afterRun:() ‑> Void):Autorun
Creates a new Autorun
instance with the given callback associated with the current entity.
Parameters:
run | The run callback |
---|
Returns:
The autorun instance