private void Stop(BehaviourTreeExecutor <TBlackboard> executor,
                   BehaviourTreeExecutionData <TBlackboard> data,
                   BehaviourTreeStatus status)
 {
     AbortRunningChildren(executor, data);
     executor.Stop(data, this, status);
 }
 public void OnComplete(BehaviourTreeExecutor <TBlackboard> executor, BehaviourTreeExecutionData <TBlackboard> execution, BehaviourTreeStatus status)
 {
     if (status != _status)
     {
         executor.Stop(execution, this, BehaviourTreeStatus.Success);
     }
     else
     {
         executor.Schedule(execution, Node, this);
     }
 }
        public void OnComplete(BehaviourTreeExecutor <TBlackboard> executor, BehaviourTreeExecutionData <TBlackboard> execution, BehaviourTreeStatus status)
        {
            var node = GetCurrentChild(execution);

            if (execution.Statuses[node.Id] == BehaviourTreeStatus.Success)
            {
                executor.Stop(execution, this, BehaviourTreeStatus.Success);
                return;
            }

            var currentChild = ++execution.Variables[_currentChildId];

            if (currentChild == ChildrenCount)
            {
                executor.Stop(execution, this, BehaviourTreeStatus.Failure);
            }
            else
            {
                executor.Start(execution, GetCurrentChild(execution), this);
            }
        }
 public void OnComplete(BehaviourTreeExecutor <TBlackboard> executor, BehaviourTreeExecutionData <TBlackboard> execution, BehaviourTreeStatus status)
 {
     executor.Stop(execution, this, BehaviourTreeStatus.Failure);
 }