예제 #1
0
 public void MakeTransition(GameNodeName _nodeName, GuidePrecondition _condition,GuideInput _input)
 {
     GuideNode _node = _dictNodes[_nodeName];
     _node.input = _input;
     _node.PreCondition = _condition;
     _node.RunNode();
     Current = _node;
 }
예제 #2
0
 public void AddNode(GuideNode _node, GameNodeName _nodeName)
 {
     if (_dictNodes.ContainsKey(_nodeName))
     {
         return;
     }
     _dictNodes.Add(_nodeName, _node);
 }
예제 #3
0
 protected override void Execute()
 {
     for (int i = 0; i < ListChild.Count; i++)
     {
         GuideNode _node = ListChild[i];
         _node.RunNode();
     }
 }
예제 #4
0
        public void MakeTransition(GameNodeName _nodeName, GuidePrecondition _condition, GuideInput _input)
        {
            GuideNode _node = _dictNodes[_nodeName];

            _node.input        = _input;
            _node.PreCondition = _condition;
            _node.RunNode();
            Current = _node;
        }
예제 #5
0
 protected override void Execute()
 {
     _currentIndex++;
     if (ListChild.Count <= _currentIndex)
     {
         Exit();
         return;
     }
     else
     {
         this.State = GuideState.execute;
         GuideNode _node = ListChild[_currentIndex];
         _node.RunNode();
     }
 }
예제 #6
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();//没有找到满足条件的,直接退出
 }
예제 #7
0
 public void AddNode(GuideNode _node, GameNodeName _nodeName)
 {
     if (_dictNodes.ContainsKey(_nodeName)) return;
     _dictNodes.Add(_nodeName, _node);
 }
예제 #8
0
 public void AddChild(GuideNode child)
 {
     this.ListChild.Add(child);
     child.Parent = this;
 }
예제 #9
0
 public void AddChild(GuideNode child)
 {
     this.ListChild.Add(child);
     child.Parent = this;
 }