mirror of
https://github.com/csd4ni3l/fishy-fingers.git
synced 2026-03-10 17:09:15 +01:00
Godot upload
This commit is contained in:
11
assets/scripts/click_timer.gd
Normal file
11
assets/scripts/click_timer.gd
Normal file
@@ -0,0 +1,11 @@
|
||||
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
|
||||
Reference in New Issue
Block a user