/// <summary> /// 触发状态机事件 /// </summary> /// <param name="fsmEvent"></param> /// <returns></returns> public bool Trigger(CFSMEvent fsmEvent) { if (fsmEvent == null) { return(false); } if (fsmEvent.GetEventId() != m_uTriggerEventId) { return(false); } return(true); }
/// <summary> /// FSM事件 /// </summary> /// <param name="fsmEvent"></param> public virtual void OnFSMEvent(CFSMEvent fsmEvent) { #if BTDEBUG if (m_bOpenDebug == true && fsmEvent != null) { BTDebug.Log(string.Format("<BTFSM> FSM Receive Event:{0}", fsmEvent.GetEventId())); } #endif if (m_ListenedEventList == null) { return; } m_ListenedEventList.Add(fsmEvent); }