Game Development Reference
In-Depth Information
Finally, give the game a test run to see the labels and status fields in action! Good work! You've got
a game up and running with live status indicators. If you take damage, your health indicator will be
reduced to reflect your current health. And your ammo indicator will also reflect the current ammo
status for your weapon. If your weapon is fists/punch (having no ammo), then the ammo indicator
will simply say “None” (see Figure 8-16 ).
Figure 8-16. Test-run the game with HUD health and ammo indicators
Summary
Splendid. CMOD is now looking really great. We have almost everything we need to complete the
game, and to think about taking it further by adding extra levels, characters, weapons, power-ups,
and more. In this chapter, we added further polish by creating a basic but functional GUI interface,
relying partially on the older GUI class, but also taking into consideration some of Unity's newer
features, such as 2D sprites, seeing how they can be creatively applied to create GUI graphics that
will perform better overall than the standard GUI functionality. At this point, you should be able to do
the following:
Understand what a GUI is
Understand what a HUD is
Render text on-screen using labels and the GUI class
Understand concepts such as resolution and aspect ratio
Appreciate the benefits of relative positioning through anchoring
 
Search WWH ::




Custom Search