Example #1
0
        static void DispatchCustomEvent(string name, string msg)
        {
            EventDispatcher eventDispatcher = Director.GetInstance().GetEventDispatcher();

            eventDispatcher.DispatchCustomEvent(name, msg);
        }
Example #2
0
        static void RemoveCustomEvent(EventListener eventListener)
        {
            EventDispatcher eventDispatcher = Director.GetInstance().GetEventDispatcher();

            eventDispatcher.RemoveEventListener(eventListener);
        }
Example #3
0
 public Node()
 {
     EventDispatcher = Director.GetInstance().GetEventDispatcher();
 }
Example #4
0
        static void RemoveCustomEvent(string name)
        {
            EventDispatcher eventDispatcher = Director.GetInstance().GetEventDispatcher();

            eventDispatcher.RemoveCustomEventListeners(name);
        }
Example #5
0
        static EventListener RegistCustomEvent(string name, Event callback)
        {
            EventDispatcher eventDispatcher = Director.GetInstance().GetEventDispatcher();

            return(eventDispatcher.AddCustomEventListener(name, callback));
        }
Example #6
0
 public static Director GetInstance()
 {
     return(_mInstance ?? (_mInstance = new Director()));
 }