Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
 public void AddData(NotifyData <T> data)
 {
     set.Add(data);
 }