2024-10-03 21:12:20 +02:00
|
|
|
extends TextureRect
|
2024-10-01 15:56:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
func _ready() -> void:
|
2024-10-18 16:34:51 +02:00
|
|
|
$AnimationPlayer.play_backwards("out-in")
|
2024-10-03 21:12:20 +02:00
|
|
|
hide()
|
2024-11-10 19:51:00 +01:00
|
|
|
|
2024-10-01 15:56:30 +02:00
|
|
|
|
|
|
|
func _on_duck_gameover() -> void:
|
2024-11-10 19:51:00 +01:00
|
|
|
$AnimationPlayer.pop_in()
|
2024-10-07 17:02:32 +02:00
|
|
|
$"../../Audio/GameOver".play()
|
2024-11-04 19:10:10 +01:00
|
|
|
$Restart.grab_focus()
|
2024-10-18 16:34:51 +02:00
|
|
|
print($"/root/Global".hiscore)
|
|
|
|
if %ScoreContainer.get_score() > $"/root/Global".hiscore:
|
|
|
|
$"/root/Global".write_save()
|
|
|
|
|
2024-10-01 15:56:30 +02:00
|
|
|
func _on_restart_pressed() -> void:
|
|
|
|
$"../..".start_game()
|
2024-11-10 19:51:00 +01:00
|
|
|
$AnimationPlayer.pop_out()
|
2024-10-03 21:12:20 +02:00
|
|
|
|
2024-10-22 19:52:35 +02:00
|
|
|
|
|
|
|
func _on_back_pressed() -> void:
|
|
|
|
$"/root/Global".reset_game()
|