DuckRun/code/GUI/settingsschild.gd

24 lines
570 B
GDScript3
Raw Normal View History

2024-10-03 21:12:20 +02:00
extends TextureRect
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
$AnimationPlayer.play_backwards("out-in")
hide()
func _process(_delta: float) -> void:
global_position.x = get_viewport().get_visible_rect().size.x -100
#$Logo.global_position.x = 0
func open():
show()
$AnimationPlayer.play_backwards("out-in")
$"../../Audio/Gui-in".play()
2024-10-03 21:12:20 +02:00
func _on_back_pressed() -> void:
$AnimationPlayer.play("out-in")
$"../../Audio/Gui-out".play()
2024-10-03 21:12:20 +02:00
await $AnimationPlayer.animation_finished
hide()
$"../StartSchild"._ready()