private void PreProcess() { SetLevelOrders(); mainIterator = new BehaviorIterator(this, 0); activeTimers = new UpdateList <Timer>(); SetRootIteratorReferences(); }
public override void OnStart() { if (ChildCount() != 2) { throw new System.Exception("SimpleParallel's children should equal to 2"); } var count = ChildCount(); childrenStatus = new EStatus[count]; branchIterator = new BehaviorIterator[count]; for (int i = 0; i < count; i++) { branchIterator[i] = new BehaviorIterator(Tree, levelOrder + 1); foreach (var node in TreeTraversal.PreOrderSkipChildren(GetChildAt(i), n => n is SimpleParallel)) { node.Iterator = branchIterator[i]; } } }