Game Development Reference
In-Depth Information
In the options menu, you make sure the value of this variable is always the same as the state of
the Hints button. This is done in the update method of PenguinPairsGameWorld , and you use the on
property that you added to the button:
GameSettings.hints = this.onOffButton.on;
This completes the options menu. Figure 19-2 shows what it looks like.
Figure 19-2. A screenshot of the PenguinPairs2 example
What You Have Learned
In this chapter, you have learned:
How to create a menu with a variety of buttons and sliders
How to retrieve the values of buttons and sliders and translate that information
into game settings
 
Search WWH ::




Custom Search