class_name NYXRelic
extends Area2D

signal collected(relic: NYXRelic)

@export var shadow_restore: float = 26.0

func _ready() -> void:
	body_entered.connect(_on_body_entered)

func _process(delta: float) -> void:
	rotation += delta * 1.8

func _on_body_entered(body: Node2D) -> void:
	if body is NYXPlayer:
		body.restore_shadow(shadow_restore)
		collected.emit(self)
		queue_free()
