Adding in points, score, and wave numbers

One of the most important things to do in a game is reward the player and give them a sense of progression. For now, let's reward the player with a score we will display for them and also let the player know exactly which wave he is on. Perform the following steps:

  1. Create a new Text object by going to the Hierarchy tab and selecting Create | UI | Text.

    You'll notice that three objects get created at this point: Canvas, Text, and Event System. Right now, we only need to worry about Text; however, the three objects are all needed in order for Unity's new UI system to function properly. We will be discussing this in much more detail in a later chapter.

  2. Next, select the Text object again and notice that the ...

Get Unity 5: Learning C# by Developing Games now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.