public void DispatchEvent(string type, object eventObj = null) { if (_eventDictionary.ContainsKey(type)) { System.Action <BaseEvent> function = _eventDictionary[type]; BaseEvent evt = BaseEvent.GetCache(type, eventObj); function.Invoke(evt); BaseEvent.Cache(evt); } }