dd5b4bcae5
- adding coins (no shop jet) - adding skin changing [no gui jet - fixing loops for deleting stuff]
23 lines
489 B
GDScript
23 lines
489 B
GDScript
extends TextureRect
|
|
|
|
|
|
func _ready() -> void:
|
|
$AnimationPlayer.play_backwards("out-in")
|
|
hide()
|
|
|
|
|
|
func _on_duck_gameover() -> void:
|
|
$AnimationPlayer.pop_in()
|
|
$"../../Audio/GameOver".play()
|
|
$Restart.grab_focus()
|
|
print($"/root/Global".hiscore)
|
|
if %ScoreContainer.get_score() > $"/root/Global".hiscore:
|
|
$"/root/Global".write_save()
|
|
|
|
func _on_restart_pressed() -> void:
|
|
$"../..".start_game()
|
|
$AnimationPlayer.pop_out()
|
|
|
|
|
|
func _on_back_pressed() -> void:
|
|
$"/root/Global".reset_game()
|