예제 #1
0
        // TODO: FINISH THIS FUNCTIONALITY
        public IEnumerator BatchLerpFunction(float duration, AsyncLerpRoutine callback)
        {
            float startTime = 0.0f;

            while (startTime < duration)
            {
                startTime += Time.deltaTime;

                callback(startTime, duration);
                yield return(null);
            }
        }
예제 #2
0
        public IEnumerator AfterLerpFunction(float duration, AsyncLerpRoutine callback, AsyncCallbackFunction afterFunction)
        {
            float startTime = 0.0f;

            while (startTime < duration)
            {
                startTime += Time.deltaTime;

                callback(startTime, duration);
                yield return(null);
            }
            afterFunction();
        }
예제 #3
0
        public IEnumerator DelayedLerpFunction(float delay, float duration, AsyncLerpRoutine callback)
        {
            yield return(new WaitForSeconds(delay));

            float startTime = 0.0f;

            while (startTime < duration)
            {
                startTime += Time.deltaTime;

                callback(startTime, duration);
                yield return(null);
            }
        }
예제 #4
0
        public IEnumerator BlockingLerpFunction(float duration, AsyncLerpRoutine callback)
        {
            while (_locked)
            {
                yield return(null);
            }

            _locked = true;
            float startTime = 0.0f;

            while (startTime < duration)
            {
                startTime += Time.deltaTime;

                callback(startTime, duration);
                yield return(null);
            }
        }