Game Development Reference
In-Depth Information
In the StartMenuGUI script, below the // Start Game line, add
1.
Screen.showCursor = false; // hide the cursor
2.
Save the script.
3.
Click Play, and test.
You probably won't see the expected results unless you are using “Maximize on Play” or make a
new build, but it should be turned back on when the game is won or lost.
In the EndGameGUI script, TriggerMessage function, add the following above
the showEndGUI line:
4.
Screen.showCursor = true; // show the cursor
5.
Save the script.
6.
Turn on “Maximize on Play,” and test.
The cursor disappears and reappears on cue.
7.
Save the scene.
Refining the Starting Game Play
When you were originally setting up the garden level, the Gnomatic Garden Defender was in the
staging area. This gives the player time to practice navigation and weaponry before beginning the
challenge. Currently, however, both the zombie bunnies and the battery countdown begin at
scene start-up.
The best scenario would be for the original zombie bunny drop to happen at start-up but have nothing
else triggered until the Gnomatic Garden Defender has entered the garden for the first time. On the off
chance the player leaves the garden and then returns, the triggering should happen only once.
1.
Open the GardenLevel1 scene.
2.
Move the Gnomatic Garden Defender back into the staging area if you
haven't already.
Let's begin by preventing the battery drain at the start. You may remember it already has a tracking
variable that you left in the on position while testing.
3.
Open the BatteryHealth script.
Set the trackingBattery variable to false :
4.
internal bool trackingBattery = false; // timer not started
5.
Save the script.
 
Search WWH ::




Custom Search