Game Development Reference
In-Depth Information
Updating level 1 pop ups
Now that pop ups of level 2 are finished, let's update and modify the pop ups for level
1.
1. We need to create a start pop up for level 1 that matches the pattern of the
other two levels.
2. Copy popup_Level2Start from MainCamera , and paste it on MainCam-
era as well.
3. Rename the copy as popup_Level1Start .
4. At this point in time, your MainCamera hierarchy should look similar to the
following screenshot:
5. Set the first action on Button1 to CameraLookPlayer() so that when the
level starts, the camera will track the hero.
6. Set the second action on Button1 to DisableOb-
ject(popup_Level1Start) . This will hide this panel while still leaving it
attached to the MainCamera GameObject persistent in _global .
7. We will not need to allow the user to repeat level 1. Since there is no fail con-
dition, we will not need a repeat pop up for level 1. The level complete pop
up will be dynamically allocated as a reward for finishing the level 1 mission
of returning flags to the monument as originally designed.
8. To support easy programmatic access to these pop ups, we will write a
PopupMgr script to store references to these pop-up objects. This class will
then be used to access these pop ups for easy enabling and disabling.
9. Create a new script with the C# script wizard named PopupMgr , and attach
it to the MainCamera instance in the _global hierarchy.
10. Give this script eight public references to the following GameObject pop ups:
Search WWH ::




Custom Search