This commit is contained in:
Rendo 2025-10-17 18:22:49 +05:00
commit 074bb21ffd
18 changed files with 99 additions and 51 deletions

View file

@ -0,0 +1,16 @@
extends Timer
const tics_per_second :float = 32.0
signal tick(current_tick: int)
var current_tick: int
func _ready() -> void:
start(1.0/tics_per_second)
timeout.connect(make_tick)
func make_tick():
current_tick += 1
if current_tick >= tics_per_second:
current_tick -= int(tics_per_second)
tick.emit(current_tick)