public BehaviorParallelNode(string Name, BehaviorNode Parent, BehaviorPrecondition Condition = null) : base(Name, Parent, Condition) { Mode_ = BehaviorParallelMode.Or; ChildrenState_ = new BehaviorRunningState[MaxChildCount]; for (var Index = 0; Index < MaxChildCount; ++Index) { ChildrenState_[Index] = BehaviorRunningState.Running; } }
public static BehaviorNode CreateParallelNode(string Name, BehaviorNode Parent, BehaviorPrecondition Condition, BehaviorParallelMode Mode) { var Node = new BehaviorParallelNode(Name, Parent, Condition); Node.SetMode(Mode); Parent?.AddChild(Node); return(Node); }
public BehaviorParallelNode SetMode(BehaviorParallelMode Mode) { Mode_ = Mode; return(this); }