//添加事件监听 public void AddEventListener(string eventType, object listener, EventCenterFunction callback) { if (listener == null || eventType == null) { return; } //记录事件 AddEvent(eventType); //添加事件监听器 List <CEventListener> list = m_eventListenerList[eventType]; CEventListener e = new CEventListener(listener, callback); list.Add(e); }
public CEventListener(object listener, EventCenterFunction callback) { m_listener = listener; m_callback = callback; }