mirror of
https://github.com/csd4ni3l/fishy-fingers.git
synced 2026-03-10 08:59:17 +01:00
12 lines
344 B
GDScript
12 lines
344 B
GDScript
extends Timer
|
|
|
|
func _on_timeout() -> void:
|
|
Globals.last_fish_per_second = Globals.fish_per_second
|
|
Globals.fish_per_second = 0
|
|
if Globals.all_hit > 0:
|
|
Globals.last_hit_percent = min((float(Globals.successful_hit) / float(Globals.all_hit)) * 100, 100.0)
|
|
else:
|
|
Globals.last_hit_percent = 0
|
|
Globals.successful_hit = 0
|
|
Globals.all_hit = 0
|