2026-08-12 01:47:15 +02:00
|
|
|
extends PanelContainer
|
2026-08-02 16:19:24 +02:00
|
|
|
|
|
|
|
|
|
2026-08-12 01:47:15 +02:00
|
|
|
var done: bool = false
|
|
|
|
|
|
2026-08-02 16:19:24 +02:00
|
|
|
func sound_loading():
|
2026-08-05 23:37:19 +02:00
|
|
|
print("loading screen shown")
|
2026-08-02 16:19:24 +02:00
|
|
|
show()
|
|
|
|
|
|
|
|
|
|
func sound_loading_done():
|
2026-08-05 23:37:19 +02:00
|
|
|
print("loading screen hidden")
|
2026-08-12 01:47:15 +02:00
|
|
|
#hide()
|
|
|
|
|
%Label.text = "Done!"
|
|
|
|
|
done = true
|
2026-08-02 16:19:24 +02:00
|
|
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
2026-08-07 14:01:16 +02:00
|
|
|
func _ready() -> void:
|
2026-08-12 01:47:15 +02:00
|
|
|
Sounds.loading.connect(sound_loading)
|
|
|
|
|
Sounds.loading_done.connect(sound_loading_done)
|
2026-08-02 16:19:24 +02:00
|
|
|
pass # Replace with function body.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
|
|
func _process(delta: float) -> void:
|
2026-08-12 01:47:15 +02:00
|
|
|
if done and %ColorRect.color != Color(0,0,0,0):
|
|
|
|
|
%ColorRect.color = lerp(%ColorRect.color, Color(0,0,0,0), delta)
|