Used for grouping FSM instances and updating them according to the stack's updateMode.

Constructor

new()

Variables

read onlyisEmpty:Bool

Test if the stack is empty

Methods

destroy():Void

Destroys every member in stack and self

lock(name:String):Void

Locks the specified FSM for the duration of the update loop

Parameters:

name

The name of the FSM to lock

lockRemaining():Void

Locks the remaining FSMs for the duration of the update loop

lockType(bitflag:Int):Void

Locks by type, so that if FSM.type & bitflag != 0, the FSM gets locked.

Parameters:

bitflag

You can use FSMType abstract for values or build your own.

pop():FlxFSM<T>

Removes the first FSM from the stack

Returns:

The removed FSM

push(FSM:FlxFSM<T>):Void

Adds the FSM to the end of the stack

Parameters:

FSM

The FSM to add

remove(FSM:FlxFSM<T>):Void

Removes the FSM from the stack and destroys it

Parameters:

FSM

The FSM to remove

removeByName(name:String):Void

Removes the FSM with given name from the stack and destroys it

Parameters:

name

The name of the FSM to remove

shift():FlxFSM<T>

Removes the first FSM from the stack

Returns:

The removed FSM

unshift(FSM:FlxFSM<T>):Void

Adds the FSM to the front of the stack

Parameters:

FSM

The FSM to add

update(elapsed:Float):Void

Updates the states that have not been locked