extends Area3D

@export var fade_ui: CanvasLayer

var triggered := false

func _ready():
	body_entered.connect(_on_body_entered)

func _on_body_entered(body):
	if triggered:
		return
	if body.name != "Player":
		return

	triggered = true
	fade_ui.start_ending()
