DuckRun/code/GUI/startschild.gd

28 lines
611 B
GDScript3
Raw Normal View History

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
$AnimationPlayer.play_backwards("out-in")
$"../../Audio/Gui-in".play()
2024-10-01 15:56:30 +02:00
show()
func _process(delta: float) -> void:
$Logo.global_position.x = -5
2024-10-01 15:56:30 +02:00
func _on_start_pressed() -> void:
$"../..".start_game()
2024-10-03 21:12:20 +02:00
$AnimationPlayer.play("out-in")
$"../../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
func _on_settings_pressed() -> void:
$AnimationPlayer.play("out-in")
$"../../Audio/Gui-out".play()
2024-10-03 21:12:20 +02:00
await $AnimationPlayer.animation_finished
hide()
$"../Settings".open()