Game Development Reference
In-Depth Information
Most of the properties are clear, and they are familiar to anyone who deals with text in
computer. Our focus will be on Text property, which we need to access through a script
and modify it. To begin with lives display, we have first to add a 3D Text and position it
in an appropriate position. For example, we can position it in the top of game view. It is a
good idea to give the text an initial value, such as 0. After that we have to write a script
that reads the number of lives the player has and updates the displayed text correspondingly.
This script is LivesCounterHandler , shown in Listing 80.
Search WWH ::




Custom Search