It looks like you're new here. If you want to get involved, click one of these buttons!
I am making my first platformer and am stuck on the health system. I don't know how to take damage on collisions with enemies. Here is my simple code
void takeDamage(int damage)
currentHealth = currentHealth - damage;
This is all in the update function.
All I need to do is replace the press of the E button with a collision with any object with the tag "enemy" also what would be very helpful is if there was a 1 second delay before you could take damage again, so you know, it doesn't drain your health in a split second
Thanks a lot in advance :)