Game Development Reference
In-Depth Information
Clicking the Play button starts the game proper. In the Action view, the user plays the game. He
moves the ship up and down, trying to score as many points as possible by destroying asteroids
and saucers.
While playing, the user may click the Pause button to stop the game. When the Pause button is
pressed, a dialog pops up asking the user if he would like to exit the game or not. This dialog
is also brought up if the application is sent to the background while the game is in progress.
When the ship's health reaches zero, the game ends. When this happens, a dialog is presented
asking the user if he would like to play again or not.
If the user has paused the game and selected not to end it, he is brought back to the Start view.
Similarly, when the game is over, if the user chooses not to play again, he is brought back to the
main view.
Launching the Application
Like all iOS applications, the starting place is the main function found in the file main.m . However,
in this application, we don't customize that at all, so we can skip describing it. The real starting
place for this application is the plist file, Belt Commander-Info.plist . Figure 12-7 shows Xcode's
representation of this file.
 
Search WWH ::




Custom Search