Package | org.puremvc.as3.utilities.statemachine |
Class | public class FSMInjector |
Inheritance | FSMInjector ![]() |
This allows reconfiguration of the StateMachine
without changing any code, as well as making it
easier than creating all the State
instances and registering them with the
StateMachine
at startup time.
Property | Defined by | ||
---|---|---|---|
fsm : XML | FSMInjector | ||
stateList : Array | FSMInjector | ||
states : Array [read-only]
Get the state definitions.
| FSMInjector |
Method | Defined by | ||
---|---|---|---|
FSMInjector(fsm:XML)
Constructor.
| FSMInjector | ||
inject():void
Inject the
StateMachine into the PureMVC apparatus. | FSMInjector |
Method | Defined by | ||
---|---|---|---|
createState(stateDef:XML):State
Creates a
State instance from its XML definition. | FSMInjector | ||
isInitial(stateName:String):Boolean
Is the given state the initial state?
| FSMInjector |
fsm | property |
protected var fsm:XML
stateList | property |
protected var stateList:Array
states | property |
states:Array
[read-only]Get the state definitions.
Creates and returns the array of State objects from the FSM on first call, subsequently returns the existing array.
Implementation protected function get states():Array
FSMInjector | () | constructor |
public function FSMInjector(fsm:XML)
Constructor.
Parametersfsm:XML |
createState | () | method |
protected function createState(stateDef:XML):State
Creates a State
instance from its XML definition.
stateDef:XML |
State |
inject | () | method |
public function inject():void
Inject the StateMachine
into the PureMVC apparatus.
Creates the StateMachine
instance, registers all the states
and registers the StateMachine
with the IFacade
.
isInitial | () | method |
protected function isInitial(stateName:String):Boolean
Is the given state the initial state?
ParametersstateName:String |
Boolean |