public void RemoveListener(object eventKey, EZEventHandler eventHandler) { int intKey = eventKey.GetHashCode(); if (m_Events.ContainsKey(intKey)) { m_Events[intKey].handlers -= eventHandler; } }
public void AddListener(object eventKey, EZEventHandler eventHandler) { int intKey = eventKey.GetHashCode(); if (m_Events.ContainsKey(intKey)) { m_Events[intKey].handlers += eventHandler; } else { m_Events.Add(intKey, new EZEvent(eventHandler)); } }
public EZEvent(EZEventHandler handler) { handlers += handler; }