Commkeen/pyroclast — pull request #1 by Commkeen (2013-10-23 00:11:07+00:00)
Title: Added AI code

To give a FlxSprite AI, give it an AIStateMachine and an ActionManager.
Get the AIStateMachine by calling
StateMachineFactory.create*ENEMYNAME*StateMachine( params as seen in
StateMachineFactory), and create the action manager as a new
ActionManager(). In the update, get the actions to schedule through
stateMachine.update, go through each action and schedule each action
through actionManager.scheduleAction, then call actionManager.execute.
EXAMPLE: var actions:Array = _stateMachine.update();

for ( var i:int = 0; i < actions.length; ++i )
{
_actionManager.scheduleAction(actions[i] as IAIAction );
}

_actionManager.execute();

super.update();