public void Start() { mainAction.Start(); if (actionToInterrupt != null) { actionToInterrupt.Interrupt(); } }
public override void Start() { current = actions.Current; current.register (currentDone); current.Start (); bool hasNext = actions.MoveNext (); if(hasNext){ next = actions.Current; } }
public override void Start() { current = actions.Current; current.register(currentDone); current.Start(); bool hasNext = actions.MoveNext(); if (hasNext) { next = actions.Current; } }
public override void Start() { if ((bool)GameStateManager.Instance.GetVariable(variableName)) { action = actionIfTrue; } else { action = actionIfFalse; } action.Start(); }
//Called when curreng subAction finishes //Either start next action, or if no more actions left, call done protected void currentDone() { if (next != null) { next.register(currentDone); next.Start(); current = next; bool hasNext = actions.MoveNext(); if (hasNext) { next = actions.Current; } else { next = null; } } else { done(); } }