protected override void onTransition(BehaviourTreeData wData) { TBTActionLoopContext thisContext = getContext <TBTActionLoopContext>(wData); if (IsIndexValid(0)) { BehaviourAction node = GetChild <BehaviourAction>(0); node.Transition(wData); } thisContext.currentCount = 0; }
protected override void onTransition(BehaviourTreeData wData) { TBTActionSequenceContext thisContext = getContext <TBTActionSequenceContext>(wData); BehaviourAction node = GetChild <BehaviourAction>(thisContext.currentSelectedIndex); if (node != null) { node.Transition(wData); } thisContext.currentSelectedIndex = -1; }
protected override void onTransition(BehaviourTreeData wData) { TBTActionParallelContext thisContext = getContext <TBTActionParallelContext>(wData); for (int i = 0; i < GetChildCount(); ++i) { BehaviourAction node = GetChild <BehaviourAction>(i); node.Transition(wData); } //clear running status initListTo <int>(thisContext.runningStatus, BehaviourTreeRunningStatus.EXECUTING); }