December 2011
Beginner
693 pages
19h 56m
English
The settings screen offers the player an option to change the input method, as well as enable or disable audio. Indicate this with three different icons (see Figure 12–4). Touching either the hand or the tilted device will enable the respective input method. The icon for the currently active input method will have a gold color. For the audio icon, do the same as in the previous games.
The choices of the user are reflected by setting the respective Boolean values in the Settings class. Make sure these settings are instantly saved to the SD card each time one of them changes, via a call to Settings.save(). Listing 12–5 shows you the code.
Listing 12–5. SettingsScreen.java, the Settings Screen
package com.badlogic.androidgames.droidinvaders; ...Read now
Unlock full access