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 ...
Get Learning iOS Game Programming 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.