internal bool Execute(Processor processor) {
if (this.action == null) {
return true;
}
// Execute the action
this.action.Execute(processor, this);
// Process results
if (State == Action.Finished) {
// Advanced to next action
if(this.container != null) {
this.currentAction ++;
this.action = this.container.GetAction(this.currentAction);
State = Action.Initialized;
}
else {
this.action = null;
}
return this.action == null;
}
return false; // Do not pop, unless specified otherwise
}