Exemplo n.º 1
0
        public ConditionNode Condition(Func <bool> condition)
        {
            var newNode = new ConditionNode(condition);

            this.ChildNodes.Add(newNode);
            return(newNode);
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 public void AddCondition(ConditionNode added)
 {
     if (conditionList == null)
     {
         conditionList = new List <ConditionNode>();
     }
     conditionList.Add(added);
 }
Exemplo n.º 5
0
 public ConditionNode(ConditionNode other) : base(other)
 {
 }