Example #1
0
    public void StopListening(string eventName, UnityAction <object> listener)
    {
        GeneralEvent thisEvent = null;

        if (eventDictionary.TryGetValue(eventName, out thisEvent))
        {
            thisEvent.RemoveListener(listener);
        }
    }
Example #2
0
    public static void StopListening(int eventName, UnityAction <GeneralData> listener)
    {
        if (eventManager == null)
        {
            return;
        }
        GeneralEvent thisEvent = null;

        if (instance.eventDictionary.TryGetValue(eventName, out thisEvent))
        {
            thisEvent.RemoveListener(listener);
        }
    }