extends Spatial
signal player_entered(player, camera)
signal player_exited(player, camera)

func _on_hitbox_area_entered(area):
	var owner = area
	if area.has_meta("owner"):
		owner = area.get_meta("owner")
	if owner.is_in_group("player"):
		emit_signal("player_entered", owner, $camera)


func _on_hitbox_area_exited(area):
	var owner = area
	if area.has_meta("owner"):
		owner = area.get_meta("owner")
	if owner.is_in_group("player"):
		emit_signal("player_exited", owner, $camera)
