Someone call a doctor!

When you're fighting against an enemy, it is imperative that you know how much life you have left, especially if you have the ability to heal yourself during a high-intensity shoot-out, or when you're the last man standing defending your team's title! In gamified applications, health can also be a way to provide players with a limited number of opportunities to fail, before having a cool down period and resuming the experience or prompting them to start again. In either case, health can be displayed in many different ways. You can have a series of hearts, a green bar, or you might have something such as a percentage next to an icon. For the purpose of this chapter, we will create a health counter like the one in the following ...

Get Gamification with Unity 5.x now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.