Is it possible to use OnUpdate() for a fixed amount of time, without any real tweening going on?
I think this would look cleaner than most alternatives.
IEnumerator _Fooroutine()
{
// What I'd like to do:
var tween = DOWait(1.2f)
.OnUpdate(()=>(/* Do stuff*/));
yield return tween.WaitForCompletion();
// What I usually end up doing:
float waitTimer = 1.2f;
while (waitTimer > 0f)
{
// Do stuff
waitTimer -= Time.deltaTime;
yield return null;
}
// Or
var timer = TimerManager.SetNew(1.2f);
while (!timer.IsExpired)
{
// Do stuff
yield return null;
}
timer.Release();
}
Is it possible to use OnUpdate() for a fixed amount of time, without any real tweening going on? I think this would look cleaner than most alternatives.