add timer struct
This commit is contained in:
parent
9fb75de9be
commit
6f268859da
1 changed files with 10 additions and 0 deletions
10
util/cooldown.odin
Normal file
10
util/cooldown.odin
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
package util
|
||||||
|
|
||||||
|
Timer :: struct {
|
||||||
|
time: f32,
|
||||||
|
}
|
||||||
|
|
||||||
|
tick_timer :: proc(timer: ^Timer, by: f32) -> bool {
|
||||||
|
timer.time -= by
|
||||||
|
return timer.time < 0
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue