5. All About Control

In this chapter, you will learn three main ways to control the player’s sprite: touching the screen, using an onscreen joystick, and tilting the iOS device.

To this point, Raiders has had only one scene. Now you will learn how to switch scenes and examine two types of sprites: an Action-Item that responds to user taps and the main player sprite.

Changing Scenes

In Chapter 4, you explored the concept of scenes; but the code in that chapter included only a main, or menu, screen. For this chapter, you need a mechanism to switch to a new scene. In the Chapter 5 code, you’ll notice several new files and classes that include the switching scene code and the new sprites.

At this point, the menu screen consists of a background sprite ...

Get Building iOS 5 Games: Develop and Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.