Book Image

Cocos2d Game Development Essentials

Book Image

Cocos2d Game Development Essentials

Overview of this book

Table of Contents (13 chapters)

Chapter 4. Animation with SpriteBuilder

In the previous chapter, you were introduced to SpriteBuilder. In order to keep it simple, the tutorial did not use any graphical assets. In this chapter, you will learn how to add assets to SpriteBuilder and create animations for them. It will really take your Flappy Bird game to the next level. You will also be introduced to particles to add a nice little effect to the bird when the user taps the screen.

The following points will be covered in this chapter:

  • Adding sprite assets to SpriteBuilder

  • Animating in SpriteBuilder using sprite frames

  • Animating nodes in SpriteBuilder using keyframes

  • Animating in code using actions

    • Moving, scaling, and rotating

    • Sequencing actions

    • Delaying actions

    • Running actions at the same time

    • Repeating actions

    • Running code with actions to get a callback