HitBox and HurtBox

Hi!
I’m trying to make a game similar to Vampire Survivors.
I’m having a problem with the damage-dealing/damage-taking architecture.
Right now, I have the basic HitBox and HurtBox components.
However, for example, enemies in the game will attack the player “with their bodies,” and if they’re inside the player’s HurtBox, they should deal damage to the player at regular intervals. Some weapons will work this way as well. But other weapons will only deal damage once, upon hitting the player.
My code currently doesn’t allow for continuous damage.
How can I fix this?
Do I need to create separate hitboxes for elements that deal periodic damage? And, for example, add a timer to them? But at the same time, there could be hundreds of enemies on the screen in a game like this, and adding a timer to each one doesn’t seem like the best idea.
What direction should I take?

class_name HitBox
extends Area2D


var damage: float = 10.0

func setup(damage: float) -> void:
	self.damage = damage
class_name HurtBox
extends Area2D


signal hit_received(damage: float)

func _on_area_entered(hit_box: HitBox) -> void:
	hit_received.emit(hit_box.damage)

No, you can use the same areas you have already, but you additionally connect to the area_exited signal.

If a monster deals periodic damage and the monster did not exit the area yet, then regularly (for example with a timer) deal the damage.

In that case accumulate the damage and have one counter apply the damage of all enemies which are close.

The question is tho if you have also hundreds of enemies dealing damage at once.