O'Reilly logo

Building iOS 5 Games: Develop and Design by James Sugrue

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required