Game Development Reference
In-Depth Information
Tutorial 17.1: Winning
The process we're going to follow is to first create the congratulations level—
the level the game goes to if the player indeed gets to the end and wins.
Within this level we'll build the scripting mechanism to allow the game to quit
and to restart the game. Then, in the Hallway scene we'll create the trigger
that will signal that the player has reached the end.
Step 1: Duplicate Scene-Opening in the Project panel. Just select
Scene-Opening and choose Edit>Duplicate. Rename the duplicate
Scene-Closing .
Why?
This congratulations level could be a lot of things, and if you'd like it
to be something besides the spinning version of Aegis, go ahead and
create that. This closing level can have anything as the visual candy—the
important thing will be the buttons.
Step 2: Open Scene-Closing by double-clicking it in the Project panel.
Step 3: In the Hierarchy delete the data panels and buttons. Left behind
should just be Aegis ( Figure 17.1 ).
Figure 17.1 Beginnings of closing
level.
Step 4: Create three GUITexture objects. Populate them with DataPanel_
Congratulations, Button_Exit, and Button_PlayAgain. Resize and
place them to approximate Figure 17.2 or to taste. Rename them
Congratulations, Button-Exit and Button-PlayAgain .
Tips and Tricks
Remember this is done with combinations of the Transform X and Y
values and using the Pixel Inset settings.
Step 5: In the Project panel, duplicate OpenSceneButtonsScript. Rename
the duplicate CloseSceneButtonScript and open it.
Search WWH ::




Custom Search