Game Development Reference
In-Depth Information
When dealing with the Label element, you discovered that you could override the font on an
individual level. If it was a dynamic font (where it was handled by the OS), you could even change its
size. Other parameters of note dealt with its wrap type, offsets, and other useful options. With the
addition of button elements , you discovered how you could define a border size that allowed the
interior of the image to be stretched while preserving the outer corners.
Next you created several scenes or levels that functioned solely as menus. You got a chance to
combine 2D, both sprite and UnityGUI, and 3D elements to create a start screen that provided a
bit of back-story for the game, along with instructions for navigation and weaponry. Making use of
Mecanim for some tab-type animation, you discovered that to register mouse events, an object,
whether 2D or 3D, requires a collider.
With a handful of levels to navigate between, you then set up the logic and scripting that allowed
the player to access the menus or levels during game play. The mainstay of level hopping,
DontDestroyOnLoad , you found, either required scripting to prevent duplicate objects or had to be
carried through into each level on its own. With the levels on their way to behaving themselves,
you added them to the build, getting some practice with re-arranging their order, and you were
consequently able to move back and forth between scenes during runtime.
Returning to your Settings menu, you added a couple of very simple player settings through the use
of sliders. You allowed the player to adjust the volume on any audio components that were tagged
as “Ambient,” and you allowed the player to set the difficulty of the game. You did this through
adjusting the life of the battery and the frequency of the zombie-bunny drops. Throughout the
process, you handily dealt with little issues that cropped up.
Finally, you returned to the Player Settings, where you made some executive decisions on the
Player's options, added a new game icon and configuration dialog image, and did a final build. After
being able to play through the final game and, hopefully, giving yourself a pat on the back for a job
well done, you have probably already come up with a list of improvements, refinements, and extra
functionality.
Search WWH ::




Custom Search