18 lines
400 B
GDScript
18 lines
400 B
GDScript
extends Control
|
|
class_name Loading
|
|
|
|
@onready var animation: AnimationPlayer = %AnimationPlayer
|
|
@onready var label: Label = %LoadingLabel
|
|
|
|
func _ready() -> void:
|
|
play()
|
|
|
|
func play() -> void:
|
|
animation.play("LoadingSpinner/anim_loading_game")
|
|
|
|
func stop() -> void:
|
|
if animation.is_playing():
|
|
animation.stop()
|
|
animation.play("LoadingSpinner/anim_loading_done")
|
|
await animation.animation_finished
|