public static InvokeHandle Begin(UpdatePump pump, System.Action callback, float duration, ITimeSupplier time) { if (pump == null) { throw new System.ArgumentNullException("pump"); } var handle = _pool.GetInstance(); handle._callback = callback; handle._handle = WaitForDuration.Seconds(duration, time); handle._pump = pump; pump.Add(handle); return(handle); }
public static InvokeHandle Begin(UpdatePump pump, System.Action callback, System.Collections.IEnumerator e) { if (pump == null) { throw new System.ArgumentNullException("pump"); } var handle = _pool.GetInstance(); handle._callback = callback; handle._handle = e; handle._pump = pump; pump.Add(handle); return(handle); }