Ejemplo n.º 1
0
    //		public void ListenForEvent(int eventId, EventListener.EventCallback callback, bool callWhenInactive = false, int priority = 0)
    public void ListenForEvent(EGameEvents eventEnum, EventListener.EventCallback callback, bool callWhenInactive = false, int priority = 0)
    {
        EventListenerData eld = new EventListenerData();

        eld.Callback         = callback;
        eld.CallWhenInactive = callWhenInactive;

        m_eventListeners[(int)eventEnum] = eld;
        Services.Get <EventManager>().RegisterListener((int)eventEnum, this, priority);
    }
Ejemplo n.º 2
0
 public void ListenForEvent(EGameEvents eventEnum, EventListener.EventCallback callback, int priority = 0)
 {
     m_eventListener.ListenForEvent(eventEnum, callback, priority);
 }