18 lines
473 B
GDScript
18 lines
473 B
GDScript
extends CanvasLayer
|
|
|
|
signal loading_screen_ready
|
|
|
|
@export var animation_player: AnimationPlayer
|
|
@onready var progress_bar: ProgressBar = %ProgressBar
|
|
|
|
func _ready() -> void:
|
|
await animation_player.animation_finished
|
|
loading_screen_ready.emit()
|
|
|
|
func _on_progress_changed(new_value: float) -> void:
|
|
progress_bar.value = new_value
|
|
|
|
func _on_load_finished() -> void:
|
|
animation_player.play_backwards("transition")
|
|
await animation_player.animation_finished
|
|
queue_free()
|