Sure, it's great to have a bar to represent our health, but what if we want something more accurate? It's like reading the gas meter on your car, are you really teetering on empty, or can you push it just a tiny bit longer?
Because I don't condone living so dangerously, I suggest we draw an actual number on screen so that we know exactly how much health we are left with. We're going to take our existing functions and make only a few changes to allow this.
Open your IDE and have your
TutorialHUD class available. We're going to make some additions.
For this recipe, we'll take what we learned in our previous recipe and add more functionality onto it. A colored health bar is great, but ...