extends AnimationPlayer

@export var character1: Node3D
@export var character2: Node3D
@export var character3: Node3D
@export var character4: Node3D

# Called when the node enters the scene tree for the first time.
func _ready():
	play("cutscene")
	if DialogueManager.global_variables.is_empty():
		character1.visible = false
		character2.visible = false
		character3.visible = false
		character4.visible = false
	else:
		character1.visible = DialogueManager.global_variables["Character1"] == true
		character2.visible = DialogueManager.global_variables["Character2"] == true
		character3.visible = DialogueManager.global_variables["Character3"] == true
		character4.visible = DialogueManager.global_variables["Character4"] == true

func _on_animation_finished(anim_name):
	get_tree().quit()
