예제 #1
0
        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);
        }
예제 #2
0
        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);
        }