Exemple #1
0
        public static void RemoveListener(string eventName, UnityAction <GameEventArgs> listener)
        {
            UnityGameEvent thisEvent = null;

            if (_eventDictionary.TryGetValue(eventName, out thisEvent))
            {
                thisEvent.RemoveListener(listener);
            }
        }
Exemple #2
0
    public static void Detach(string eventName, UnityAction <GameMessage> listener)
    {
        if (Instance == null)
        {
            return;
        }
        UnityGameEvent thisEvent = null;

        if (Instance.attachmentsDictionary.TryGetValue(eventName, out thisEvent))
        {
            thisEvent.RemoveListener(listener);
        }
    }
    public static void StopListening(string eventName, UnityAction <GameMessage> listener)
    {
        if (eventManager == null)
        {
            return;
        }
        UnityGameEvent thisEvent = null;

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