In the tick event subtract the delta time multiplied by the decrease per second.
newValue = oldValue - (deltaTime * 5)
Where 5 is the amount to decrease per second.
Clamp it to prevent it from going below zero.
In the tick event subtract the delta time multiplied by the decrease per second.
newValue = oldValue - (deltaTime * 5)
Where 5 is the amount to decrease per second.
Clamp it to prevent it from going below zero.