Exemplo n.º 1
0
 protected override void Execute()
 {
     for (int i = 0; i < ListChild.Count; i++)
     {
         GuideNode _node = ListChild[i];
         _node.RunNode();
     }
 }
Exemplo n.º 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;
        }
Exemplo n.º 3
0
 protected virtual void Exit()
 {
     _state = GuideState.exit;
     if (_parent != null)
     {
         _parent.RunNode();
     }
     else
     {
         //already root
     }
 }
Exemplo n.º 4
0
 protected override void Execute()
 {
     _currentIndex++;
     if (ListChild.Count <= _currentIndex)
     {
         Exit();
         return;
     }
     else
     {
         this.State = GuideState.execute;
         GuideNode _node = ListChild[_currentIndex];
         _node.RunNode();
     }
 }
Exemplo n.º 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();//没有找到满足条件的,直接退出
 }
Exemplo n.º 6
0
 private void OnMoveEnd()
 {
     _guideNode.RunNode();
 }