Chapter 5
Timelines & Triggers
One of SpriteBuilder’s major features is its ability to create Timeline animations using keyframes. It can even animate static physics bodies through keyframes while providing proper physics collisions, a feature that is unheard of in other 2D game engines.
This chapter explains how to create Timeline animations with SpriteBuilder and how to play such animations using CCBAnimationManager. At the end, you’ll have rotating physics gear and saw objects that can push the player forward.
You’ll also create a reusable trigger node that you can place in the level with a corresponding Trigger class. This allows you to run code when the player enters the trigger area—for instance, playing a Timeline animation on target ...
Get Learn SpriteBuilder for iOS Game Development 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.