public void ExcuteAction(int notify, T data) { NotifySet <T> set = GetNotifySet(notify); if (set != null) { set.ExceteAction(data); } }
public void RemoveNotify(int notify, GameObject target) { NotifySet <T> set = GetNotifySet(notify); if (set != null) { set.RemoveData(target); } }
public void ExcuteAction(int notify, GameObject target, T data) { NotifySet <T> set = GetNotifySet(notify); if (set != null) { set.ExceteAction(target, data); } }
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); }