Game Development Reference
In-Depth Information
3. One button simply closes the dialog if the hero didn't actually want to leave. As
we haven't stopped moving the player, the player can also do this by moving
away.
If you now add the NavigationPrompt script to the two world border ( LeftBorder
and RightBorder ) game objects, this will result in the following simple UI whenever
the player collides with the edges of our world:
We can further enhance this by tagging or naming our borders to indicate a destination. I
prefer tagging, as it does not interfere with how my scene looks in the project hierarchy;
also, I can control what tags are available and prevent accidental mistyping.
To tag a game object, simply select a Tag using the drop-down list in the Inspector when
you select the game object in the scene or project. This is shown in the following screen-
shot:
Search WWH ::




Custom Search