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