public ConditionNode Condition(Func <bool> condition)
        {
            var newNode = new ConditionNode(condition);

            this.ChildNodes.Add(newNode);
            return(newNode);
        }
Exemple #2
0
 public void RemoveCondition(ConditionNode removed)
 {
     if (conditionList != null)
     {
         conditionList.Remove(removed);
     }
 }
        /// <summary>
        /// Create an condition node.
        /// </summary>
        public BehaviorTreeBuilder Condition(string name, Func <bool> fn)
        {
            var node = new ConditionNode(name, fn);

            AddChildNode(node);

            return(this);
        }
Exemple #4
0
 public void AddCondition(ConditionNode added)
 {
     if (conditionList == null)
     {
         conditionList = new List <ConditionNode>();
     }
     conditionList.Add(added);
 }
 public ConditionNode(ConditionNode other) : base(other)
 {
 }