public void Init() { _runtimeRotateGo = new RunTimeRotateGo(); HSMManager.hSMRuntimePlay += RuntimePlay; #if UNITY_EDITOR NodeNotify.Clear(); #endif }
/// <summary> /// 执行节点抽象方法 /// </summary> /// <returns>返回执行结果</returns> public virtual int Execute(ref bool result) { result = false; #if UNITY_EDITOR NodeNotify.NotifyExecute(NodeId, Time.realtimeSinceStartup); #endif int toStateId = -1; for (int i = 0; i < _transitionList.Count; ++i) { SkillHsmConfigTransition transition = _transitionList[i]; ConditionParameter conditionParameter = null; if (_conditionParameterDic.TryGetValue(transition.TransitionId, out conditionParameter)) { result = _iconditionCheck.Condition(conditionParameter); } if (result) { toStateId = transition.ToStateId; break; } } return(toStateId); }