Hey…
So I’ve made this cooldown timer which works great
function StartTimer ()
{
var t: float = 0.0f;
while (t < 1)
{
t += Time.deltaTime / coolTimeMax;
timer = Mathf.Lerp (0, 1, t);
yield;
}
}
The problem I have with it, is I cannot “pause” it mid timer. I’ve created a pause version of Time.time called “playTime”. And I’ve managed to pause the game by enabling or disabling playtime.
So I’m trying to create the same functionality of this StartTimer function, but using the playTime value. This version of a countdown timer uses Time.deltaTime.