Ejemplo n.º 1
0
        internal bool DispatchEvent <T>(string _eventName, ref T t)
        {
            LinkedList <SuperEventListenerUnit> linkedList = DispatchEventReal <SuperFunctionCallBackV <T> >(_eventName);

            if (linkedList != null)
            {
                while (linkedList.First != null)
                {
                    LinkedListNode <SuperEventListenerUnit> node = linkedList.First;

                    SuperEventListenerUnit unit = node.Value;

                    SuperFunctionCallBackV <T> cb = unit.callBack as SuperFunctionCallBackV <T>;

                    cb(unit.index, ref t);

                    ReleaseLinkedListNode(node);

                    linkedList.RemoveFirst();
                }

                ReleaseLinkedList(linkedList);

                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
 internal void RemoveListener <T>(string _eventName, SuperFunctionCallBackV <T> _callBack)
 {
     RemoveListenerReal(_eventName, _callBack);
 }
Ejemplo n.º 3
0
 internal int AddListener <T>(string _eventName, SuperFunctionCallBackV <T> _callBack, int _priority)
 {
     return(AddListenerReal(_eventName, _callBack, _priority));
 }