コード例 #1
0
 public override void AddChild(BehaviorComponent behaviorComponent)
 {
     if (_behaviors == null)
     {
         _behaviors = new BehaviorComponent[] { }
     }
     ;
     _behaviors = _behaviors.Append(behaviorComponent).ToArray();
 }
コード例 #2
0
        /// <summary>
        /// Splice a sub tree into the parent tree.
        /// </summary>
        public BehaviourTreeBuilder Splice(BehaviorComponent subTree)
        {
            if (subTree == null)
            {
                throw new ArgumentNullException("subTree");
            }

            if (parentNodeStack.Count <= 0)
            {
                throw new ApplicationException("Can't splice an unnested sub-tree, there must be a parent-tree.");
            }

            parentNodeStack.Peek().AddChild(subTree);
            return(this);
        }
コード例 #3
0
 public override void AddChild(BehaviorComponent behaviorComponent)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 public override void AddChild(BehaviorComponent behaviorComponent)
 {
     _Behavior = behaviorComponent;
 }
コード例 #5
0
 /// <summary>
 /// Ends a sequence of children.
 /// </summary>
 public BehaviourTreeBuilder End()
 {
     curNode = parentNodeStack.Pop();
     return(this);
 }
コード例 #6
0
ファイル: Selector.cs プロジェクト: marce1994/IATP2AStarFSM
 public void AddBehaviour(BehaviorComponent behaviorComponent)
 {
     _Behaviors = _Behaviors.Append(behaviorComponent).ToArray();
 }