breadwinner/scenes/ui/loading_screen/loading_screen.gd
Hellie-xd 900f5eb6c3 kinda working options menu, but needs work
also audio lags on my pc, probably the cpu cant keep up with the audio
2026-08-12 01:47:15 +02:00

26 lines
660 B
GDScript

extends PanelContainer
var done: bool = false
func sound_loading():
print("loading screen shown")
show()
func sound_loading_done():
print("loading screen hidden")
#hide()
%Label.text = "Done!"
done = true
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
Sounds.loading.connect(sound_loading)
Sounds.loading_done.connect(sound_loading_done)
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
if done and %ColorRect.color != Color(0,0,0,0):
%ColorRect.color = lerp(%ColorRect.color, Color(0,0,0,0), delta)