Beispiel #1
0
        public void UnRegisterAllEvent()
        {
            if (m_EventRegisterHelper == null)
            {
                return;
            }

            ObjectPool <EventRegisterHelper> .S.Recycle(m_EventRegisterHelper);

            m_EventRegisterHelper = null;
        }
Beispiel #2
0
        public void RegisterEvent <K>(K key, OnEvent callback) where K : IConvertible
        {
            if (m_EventRegisterHelper == null)
            {
                m_EventRegisterHelper = ObjectPool <EventRegisterHelper> .S.Allocate();

                m_EventRegisterHelper.eventSystem = EventSystem.S;
            }

            m_EventRegisterHelper.Register(key, callback);
        }