Settings Menü und Color slider

This commit is contained in:
megamichi 2024-10-03 21:12:20 +02:00
parent 29ffdc2846
commit 9dadc9b486
17 changed files with 370 additions and 114 deletions

View file

@ -1,20 +1,24 @@
extends Sprite2D
extends TextureRect
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
global_position.y = -80
#global_position.y = -80
hide()
func _process(_delta: float) -> void:
global_position.x = get_viewport().get_visible_rect().size.x * 0.5
pass
#global_position.x = get_viewport().get_visible_rect().size.x * 0.5
func _on_duck_gameover() -> void:
$AnimationPlayer.play("in")
$AnimationPlayer.play_backwards("out-in")
show()
func _on_restart_pressed() -> void:
$"../..".start_game()
$AnimationPlayer.play("out")
$AnimationPlayer.play("out-in")
await $AnimationPlayer.animation_finished
hide()

View file

@ -0,0 +1,21 @@
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")
func _on_back_pressed() -> void:
$AnimationPlayer.play("out-in")
await $AnimationPlayer.animation_finished
hide()
$"../StartSchild"._ready()

View file

@ -1,18 +1,25 @@
extends Sprite2D
extends TextureRect
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
$AnimationPlayer.play("in")
$AnimationPlayer.play_backwards("out-in")
show()
func _process(_delta: float) -> void:
global_position.x = get_viewport().get_visible_rect().size.x -51
global_position.x = get_viewport().get_visible_rect().size.x -100
$Logo.global_position.x = 0
func _on_start_pressed() -> void:
$"../..".start_game()
$AnimationPlayer.play("out")
$AnimationPlayer.play("out-in")
await $AnimationPlayer.animation_finished
hide()
func _on_settings_pressed() -> void:
$AnimationPlayer.play("out-in")
await $AnimationPlayer.animation_finished
hide()
$"../Settings".open()