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 Wait(float time, AsyncCallbackFunction callback) { yield return(new WaitForSeconds(time)); callback(); }