Beispiel #1
0
        public static BehaviorNode CreateLoopNode(string Name, BehaviorNode Parent, BehaviorPrecondition Condition)
        {
            var Node = new BehaviorLoopNode(Name, Parent, Condition);

            Parent?.AddChild(Node);
            return(Node);
        }
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 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);
        }