DuckRun/code/GUI/startschild.gd
megamichi 2f0e5a59d9 - Gui Improvement
- ground improvement for future bioms
- first sounds
2024-10-07 17:02:32 +02:00

27 lines
611 B
GDScript

extends TextureRect
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
$AnimationPlayer.play_backwards("out-in")
$"../../Audio/Gui-in".play()
show()
func _process(delta: float) -> void:
$Logo.global_position.x = -5
func _on_start_pressed() -> void:
$"../..".start_game()
$AnimationPlayer.play("out-in")
$"../../Audio/Gui-out".play()
await $AnimationPlayer.animation_finished
hide()
func _on_settings_pressed() -> void:
$AnimationPlayer.play("out-in")
$"../../Audio/Gui-out".play()
await $AnimationPlayer.animation_finished
hide()
$"../Settings".open()