// 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); } }
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(); }
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); } }
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); } }