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); } } }
public void OnRecycle(PoolBase pool) { Execute(EventTriggerType.Recycle, pool); }
public void OnBeforeAllocation(PoolBase pool) { Execute(EventTriggerType.BeforeAllocation, pool); }
public void OnAfterAllocation(PoolBase pool) { Execute(EventTriggerType.AfterAllocation, pool); }