예제 #1
0
 private void Execute(EventTriggerType id, PoolBase data)
 {
     for (int i = 0, imax = triggers.Count; i < imax; ++i)
     {
         var ent = triggers[i];
         if (ent.eventID == id && ent.callback != null)
         {
             ent.callback.Invoke(data);
         }
     }
 }
예제 #2
0
 public void OnRecycle(PoolBase pool)
 {
     Execute(EventTriggerType.Recycle, pool);
 }
예제 #3
0
 public void OnBeforeAllocation(PoolBase pool)
 {
     Execute(EventTriggerType.BeforeAllocation, pool);
 }
예제 #4
0
 public void OnAfterAllocation(PoolBase pool)
 {
     Execute(EventTriggerType.AfterAllocation, pool);
 }