Beispiel #1
0
        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;
            }
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public BehaviorParallelNode SetMode(BehaviorParallelMode Mode)
 {
     Mode_ = Mode;
     return(this);
 }