add timer struct

This commit is contained in:
Morrígan 2025-06-28 15:47:51 +02:00
parent 9fb75de9be
commit 6f268859da
Signed by: morrigan
GPG key ID: CACB010F463A77D0

10
util/cooldown.odin Normal file
View 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
}