2024-10-03 21:12:20 +02:00
|
|
|
extends TextureRect
|
2024-10-01 15:56:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
|
|
func _ready() -> void:
|
2024-10-03 21:12:20 +02:00
|
|
|
#global_position.y = -80
|
|
|
|
hide()
|
2024-10-01 15:56:30 +02:00
|
|
|
|
|
|
|
func _process(_delta: float) -> void:
|
2024-10-03 21:12:20 +02:00
|
|
|
pass
|
|
|
|
#global_position.x = get_viewport().get_visible_rect().size.x * 0.5
|
2024-10-01 15:56:30 +02:00
|
|
|
|
|
|
|
func _on_duck_gameover() -> void:
|
2024-10-03 21:12:20 +02:00
|
|
|
$AnimationPlayer.play_backwards("out-in")
|
2024-10-07 17:02:32 +02:00
|
|
|
$"../../Audio/GameOver".play()
|
|
|
|
$"../../Audio/Gui-in".play()
|
2024-10-01 15:56:30 +02:00
|
|
|
show()
|
2024-10-09 21:02:14 +02:00
|
|
|
|
2024-10-01 15:56:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
func _on_restart_pressed() -> void:
|
|
|
|
$"../..".start_game()
|
2024-10-03 21:12:20 +02:00
|
|
|
$AnimationPlayer.play("out-in")
|
2024-10-07 17:02:32 +02:00
|
|
|
$"../../Audio/Gui-out".play()
|
2024-10-01 15:56:30 +02:00
|
|
|
await $AnimationPlayer.animation_finished
|
|
|
|
hide()
|
2024-10-03 21:12:20 +02:00
|
|
|
|
|
|
|
|