Game Development Reference
In-Depth Information
Figure 7-9. The scoreboard container completes the graphical elements needed for the game
A lot of sprites, containers, and text were just created to make up the necessary elements of Fakezee. With each
asset in place, let's backtrack a bit to hide the containers and sprites so you can give them all a fancy entrance.
Revealing the Game Elements
As the game elements were being built, several display objects were set to be initially hidden, either by given an alpha
value of 0, a visibility of false, or set as paused when first created. These lines of code were all commented out so you
could see what was being created and where things were being placed. In this section, each element will be revealed,
either by fading, sliding, or bouncing.
Hiding the Game Elements
Go back and uncomment the necessary lines of code so the game will start with an empty stage. The lines of code and
their functions are as follows:
Under the buildTitle function, uncomment
title.alpha = 0;
1.
Under the buildDiceTray function, uncomment
diceTray.alpha = 0;
rollMsg.alpha = 0;
die.visible = false; (in dice creating loop)
rollBtn.visible = false;
2.
 
Search WWH ::




Custom Search