How to add Health and Damage to my 2D Platformer?

How do I script Player Health, Enemy Health, and Damage?

Many different ways. The easiest would be to give your classes (Player and Enemy) properties for health and damage. Then you will have values you can increase and decrease based on events, like collision.

Edit - Example here: Survival Shooter Training Day Phases - Unity Learn

1 Like