Example #1
0
 protected override void Execute()
 {
     for (int i = 0; i < ListChild.Count; i++)
     {
         GuideNode _node = ListChild[i];
         _node.RunNode();
     }
 }
Example #2
0
        public void MakeTransition(GameNodeName _nodeName, GuidePrecondition _condition, GuideInput _input)
        {
            GuideNode _node = _dictNodes[_nodeName];

            _node.input        = _input;
            _node.PreCondition = _condition;
            _node.RunNode();
            Current = _node;
        }
Example #3
0
 protected virtual void Exit()
 {
     _state = GuideState.exit;
     if (_parent != null)
     {
         _parent.RunNode();
     }
     else
     {
         //already root
     }
 }
Example #4
0
 protected override void Execute()
 {
     _currentIndex++;
     if (ListChild.Count <= _currentIndex)
     {
         Exit();
         return;
     }
     else
     {
         this.State = GuideState.execute;
         GuideNode _node = ListChild[_currentIndex];
         _node.RunNode();
     }
 }
Example #5
0
 protected override void Execute()
 {
     if (_isChildRun)
     {
         Exit();
     }
     for (int i = 0; i < ListChild.Count; i++)
     {
         GuideNode _node = ListChild[i];
         if (_node.DoEvaluate())
         {
             _isChildRun = true;
             _node.RunNode();
             return;
         }
     }
     Exit();//没有找到满足条件的,直接退出
 }
Example #6
0
 private void OnMoveEnd()
 {
     _guideNode.RunNode();
 }