Hey,
I have a script on my weapon that calls a Damage function on the enemy OnTriggerStay2D. The weapon has a cooldown so that the enemy only gets hit as often as the cooldown.
The problem is that the weapon cannot hit multiple enemies since the first enemy hit will trigger the cooldown. What i want is a cooldown per enemies.
Initially the cooldown was on the enemy and it couldn't recieve damage while on cooldown, but now i want to apply diferent types of damages simultaneously so this doesn't work.
Am i doing this wrong ?
↧