public static BehaviorNode CreateLoopNode(string Name, BehaviorNode Parent, BehaviorPrecondition Condition) { var Node = new BehaviorLoopNode(Name, Parent, Condition); Parent?.AddChild(Node); return(Node); }
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 BehaviorNode(string Name, BehaviorNode Parent, BehaviorPrecondition Condition = null) { this.Name = Name; Parent_ = Parent; Children_ = new BehaviorNode[MaxChildCount]; ChildCount_ = 0; Condition_ = null; ActiveNode_ = null; PreviousActiveNode_ = null; SetCondition(Condition); }
public BehaviorPreconditionXor(BehaviorPrecondition Left, BehaviorPrecondition Right) { Left_ = Left; Right_ = Right; }
public BehaviorPreconditionNot(BehaviorPrecondition Left) { Left_ = Left; }
public static BehaviorNode CreateTerminalNode <T>(string Name, BehaviorNode Parent, BehaviorPrecondition Condition) where T : BehaviorTerminalNode, new() { var Node = new T { Name = Name }; Node.SetParent(Parent); Node.SetCondition(Condition); Parent?.AddChild(Node); return(Node); }
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 BehaviorPrecondition SetCondition(BehaviorPrecondition Condition) { Condition_ = Condition; return(Condition_); }
public BehaviorLoopNode(string Name, BehaviorNode Parent, BehaviorPrecondition Condition = null, int LoopCount = -1) : base(Name, Parent, Condition) { LoopCount_ = LoopCount; CurrentCount_ = 0; }
public BehaviorSequenceNode(string Name, BehaviorNode Parent, BehaviorPrecondition Condition = null) : base(Name, Parent, Condition) { CurrentSelectIndex_ = InvalidIndex; }
public BehaviorNonePrioritySelectorNode(string Name, BehaviorNode Parent, BehaviorPrecondition Condition = null) : base(Name, Parent, Condition) { }
public BehaviorPrioritySelectorNode(string Name, BehaviorNode Parent, BehaviorPrecondition Condition = null) : base(Name, Parent, Condition) { CurrentSelectIndex_ = InvalidIndex; PreviousSelectIndex_ = InvalidIndex; }