Scripting Our Points System

In the last chapter, we designed, developed, and incorporated a Heads-Up Display (HUD) in our game. We used a canvas game object to create text and graphics that provide visual indicators of points, health, and additional information to help the player maintain situational awareness during game play. In addition, we wrote scripts to update key components of the HUD. We also implemented a mini-map using a second camera in our game scene.

In this chapter, we will design, script, and implement our game's point system. This will include providing frame-by-frame updates to key on-screen components of the game's HUD.

Specifically, we will write scripts for the following in this chapter:

  • Collecting cherries from trees
  • Adding the cherry-throwing capability
  • Adding points based on cherry collection and combat hits
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset