Пример #1
0
        public void ExcuteAction(int notify, T data)
        {
            NotifySet <T> set = GetNotifySet(notify);

            if (set != null)
            {
                set.ExceteAction(data);
            }
        }
Пример #2
0
        public void RemoveNotify(int notify, GameObject target)
        {
            NotifySet <T> set = GetNotifySet(notify);

            if (set != null)
            {
                set.RemoveData(target);
            }
        }
Пример #3
0
        public void ExcuteAction(int notify, GameObject target, T data)
        {
            NotifySet <T> set = GetNotifySet(notify);

            if (set != null)
            {
                set.ExceteAction(target, data);
            }
        }
Пример #4
0
        public void AddNotify(int notify, GameObject target, UnityAction <T> action)
        {
            NotifySet <T> set = GetNotifySet(notify);

            if (set == null)
            {
                set        = new NotifySet <T>();
                set.notify = notify;
                registerSets.Add(set);
            }
            else
            {
                set.RemoveData(target);
            }
            NotifyData <T> info = new NotifyData <T>
            {
                target = target,
                notify = notify,
                uEvent = new NotifyEvent <T>()
            };

            info.uEvent.AddListener(action);
            set.AddData(info);
        }