Пример #1
0
 void NextState(BehaviourTreeInstance.NodeState _state, BehaviourTreeInstance _instance)
 {
     if (_state == BehaviourTreeInstance.NodeState.SUCCESS)
     {
         _instance.nodeStateDic[key] = BehaviourTreeInstance.NodeState.SUCCESS;
     }
     else if (_state == BehaviourTreeInstance.NodeState.FAILURE)
     {
         _instance.nodeStateDic[key] = BehaviourTreeInstance.NodeState.FAILURE;
     }
 }
Пример #2
0
        void NextState(BehaviourTreeInstance.NodeState state, BehaviourTreeInstance behaviourTreeInstance)
        {
            if (state == BehaviourTreeInstance.NodeState.SUCCESS)
            {
                behaviourTreeInstance.nodeStateDict[this.key] = BehaviourTreeInstance.NodeState.SUCCESS;
            }

            else if (state == BehaviourTreeInstance.NodeState.FAILURE)
            {
                behaviourTreeInstance.nodeStateDict[this.key] = BehaviourTreeInstance.NodeState.FAILURE;
            }
        }
Пример #3
0
 void NextState(BehaviourTreeInstance.NodeState _state, BehaviourTreeInstance _instance)
 {
     if (_state == BehaviourTreeInstance.NodeState.FAILURE)
     {
         _instance.nodeStateDic[key] = BehaviourTreeInstance.NodeState.FAILURE;
     }
     else if (_state == BehaviourTreeInstance.NodeState.SUCCESS)
     {
         if (actions.MoveNext())
         {
             actions.Current.Execute(_instance);
         }
         else
         {
             _instance.nodeStateDic[key] = BehaviourTreeInstance.NodeState.SUCCESS;
         }
     }
 }
Пример #4
0
        void NextState(BehaviourTreeInstance.NodeState state, BehaviourTreeInstance behaviourTreeInstance)
        {
            if (state == BehaviourTreeInstance.NodeState.FAILURE)
            {
                behaviourTreeInstance.nodeStateDict[this.key] = BehaviourTreeInstance.NodeState.FAILURE;
            }

            else if (state == BehaviourTreeInstance.NodeState.SUCCESS)
            {
                if (this.actions.MoveNext())
                {
                    this.actions.Current.Execute(behaviourTreeInstance);
                }

                else
                {
                    behaviourTreeInstance.nodeStateDict[this.key] = BehaviourTreeInstance.NodeState.SUCCESS;
                }
            }
        }