Game Development Reference
In-Depth Information
Note
Unity also adds an extra item to the arrays in the editor. This helps you when you want to
add more items; it's annoying when you want a fixed size but it is meant to help. When
the project runs, however, the correct count of items will be exposed.
Once these are set up, just return to the Inspector for the two borders, and set the right
one to The World and the left to The Cave .
Now, I was quite specific in how I named these tags, as you can now reuse these tags in
the script to both aid navigation and also to notify the player where they are going. To do
this, simply update the Do you want to travel to line to the following:
//Information text
GUI.Label(new Rect(15, 10, 300, 68), "Do you want to travel
to " +
this.tag + "?" );
Here, we have simply appended the dialog as it is presented to the user with the name of
the destination we set in the tag. Now, we'll get a more personal message, as shown in the
following screenshot:
Search WWH ::




Custom Search