extends Area2D

var credits = preload("res://credits/GodotCredits.tscn")

signal playerExit

func _on_body_entered(body: Node2D) -> void:
	if body.name == "player":
		emit_signal("playerExit")
		


func _on_animation_finished(anim_name: StringName) -> void:
	if anim_name == "fadeOut":
		get_tree().change_scene_to_packed(credits)
