Game Development Reference
GUI.Box (Rect (83,3,75,75),healthDead);
//keys in inventory
. . .
Step 37. Select the Main Camera in the Hierarchy and locate the
gui script in the Inspector. Set the values for each of the new health
textures as shown in Figure 6.12 .
FIG 6.12 Adding character health status images to the gui script.
Step 38. Play. Because the current value of the health variable in the
gui script is 100, the picture representing good health of the character
will display in the GUI.
Step 39. To add the health value into the GUI, modify gui.js as shown
in Listing 6.16 .