public void AddEvent(EventBase e, EEventCallType type) { if (type == EEventCallType.Update) { mEventList.Add(e); } else { DispatchEvent(e); } }
public void TriggerEvnet(EventBase e, EEventCallType type = EEventCallType.Update) { if (mListenerDictionary.ContainsKey(e.Tag)) { Item item = mListenerDictionary[e.Tag]; item.AddEvent(e, type); } #if ENABLE_NO_LISTENER_WARNING_MESSAGE else { //UnityEngine.Debug.LogWarning("there is no listener for " + e.Tag); } #endif }