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)