class_name HurtBox
extends Area2D

signal hit_received(hitbox: HitBox)

func _ready() -> void:
	area_entered.connect(_on_area_entered)

func _on_area_entered(area: Area2D) -> void:
	if area is HitBox and area.get_parent() != get_parent():
		hit_received.emit(area)
