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 ...

Get Getting Started with Unity 2018 - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.