Just to clear things up, I want to know an easy way to increase, or decrease a value over time (seconds) as apposed to the frame.
So normally, if I wanted to increase a value, I would just do value++ in the update, which increases the value every frame. What about every second? Is there an easy way to do that within an update?
asked Jan 23 '12 at 12:09 AM
There is a simple value that translates between seconds and frames. If you want to increment a floating-point number evenly over time, you can use
Over one second it will increase by one.
However, if you want to increment an int exactly once a second, you can use a coroutine:
This way it will increment the number exactly once a frame.
answered Jan 23 '12 at 12:18 AM