O'Reilly logo

Learning iOS Game Programming by Michael Daley

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

7. Animation

We’re starting to add all the core classes to our game engine. We can now render an image using the Image class and apply different functions to it, such as scale, rotation, and color. In Chapter 6, “Sprite Sheets,” we looked at the SpriteSheet class that enables us to store multiple images that share the same dimensions in a single image and then retrieve a sub-image (sprite) using its grid location within that larger image. We also reviewed the PackedSpriteSheet class, which enables us to handle a sprite sheet that is made up of images that have different sizes and dimensions.

In this chapter, we build on the Image, SpriteSheet, and PackedSpriteSheet classes we now have and create an Animation class. This class enables you to ...

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