cf_between_interval¶
Category: time
GitHub: cute_time.h
Returns true for one interval of seconds, every other interval.
Parameters | Description |
---|---|
interval | Number of seconds between each interval. |
offset | A starting offset in seconds for the interval. This gets mathematically modulo'd. Used to sync times for rythms or repeats. |
Remarks¶
This function is super useful for general purpose gameplay implementation where you want an event to fire for N seconds, and then not fire for N seconds, flipping back and forth periodically. Simply place this within an if-statement.