You will add health and define the winning conditions for the game
Tutorial Outcome
By the end of this tutorial, you will be able to
Add script to keep track of the health of a player
Make obstacles subtract a player’s health
Display the health of a player
Add User Interface design to the game
Tag GameObjects
Define the winning conditions
Key concepts:
Health System Attribute script
Modify Health Attribute script
Challenge Ideas:
Try introducing a GameObject that allows the player to recover points. Hint: it’s really important to use a positive value for the Modify Health Attribute script’s Health Change section