예제 #1
0
        public void RemoveListener(object eventKey, EZEventHandler eventHandler)
        {
            int intKey = eventKey.GetHashCode();

            if (m_Events.ContainsKey(intKey))
            {
                m_Events[intKey].handlers -= eventHandler;
            }
        }
예제 #2
0
        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));
            }
        }
예제 #3
0
 public EZEvent(EZEventHandler handler)
 {
     handlers += handler;
 }