Пример #1
0
        public static bool removeEventListener(this GameObject self, string type, Action <SAEventX> listener)
        {
            MonoDispatcher dispatcher = self.GetOrAddComponent <MonoDispatcher>();

            if (dispatcher == null)
            {
                return(false);
            }

            return(dispatcher.removeEventListener(type, listener));
        }
        public static bool removeEventListener(this Component self, string type, Action <SAEventX> listener)
        {
#if UNITY_EDITOR
            if (self == null)
            {
                return(false);
            }
#endif
            MonoDispatcher dispatcher = self.GetComponent <MonoDispatcher>();
            if (dispatcher == null)
            {
                return(false);
            }

            return(dispatcher.removeEventListener(type, listener));
        }