So I'm designing a simple rpg where the enemies hurt you by getting close to you. So it gives the sense that they are hurting you by touching you. I have an update function on the enemy that checks how close the player is to the enemy. Once the enemy is within it's damaging radius, it calls the apply hit function on the player and hurts them. The problem however is that the update function calls the apply hit function 70 something times a second and immediately kills the player. Does anyone know a good way to make the player invincible for a second or two? Thanks
↧