Пример #1
0
 public static void UnsubscribeUI <T_Event>(this GameObject gObj, Action <T_Event> callback)
     where T_Event : struct
 {
     EventManager.Unsubscribe(
         EventTarget.CreateTarget(gObj),
         callback,
         EventUpdateTick.LateUpdate);
 }
Пример #2
0
 public static void UnsubscribeUIWithJob <T_Job, T_Event>(this GameObject gObj, Action <T_Job> onComplete)
     where T_Job : struct, IJobForEvent <T_Event>
     where T_Event : struct
 {
     EventManager.UnsubscribeWithJob <T_Job, T_Event>(
         EventTarget.CreateTarget(gObj),
         onComplete,
         EventUpdateTick.LateUpdate);
 }
Пример #3
0
 /// <summary>
 /// Create an tick based event system.
 /// </summary>
 /// <param name="updateTick">Which tick to run in.</param>
 public TickEventSystem(EventUpdateTick updateTick)
 {
     _tick   = updateTick;
     _target = EventTarget.CreateTarget();
 }
Пример #4
0
 public static void SendEventUI <T_Event>(this GameObject gObj, T_Event ev) where T_Event : struct
 {
     EventManager.SendEvent(EventTarget.CreateTarget(gObj), ev, EventUpdateTick.LateUpdate);
 }