コード例 #1
0
        public static void StopListening(string eventName, UnityAction <object, object> listener)
        {
            if (eventManager == null)
            {
                return;
            }
            UnityTwoArgsEvent thisEvent = null;

            if (instance.eventTwoArgsDictionary.TryGetValue(eventName, out thisEvent))
            {
                thisEvent.RemoveListener(listener);
            }
        }
コード例 #2
0
        public static void StopListening(string eventName, UnityAction <object, object> listener)
        {
            if (eventManager == null)
            {
                return;                       // In case we've already destroyed our eventManager, avoid exceptions.
            }
            UnityTwoArgsEvent thisEvent = null;

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