Time for action – adding the feathers explosion

We are going to add an explosion of feathers when the arrow hits the bird. We will create about 100 feather particles at the bird's center point and then explode them in different directions gradually fading away.

To do this, we are going to add a few methods into the Bird.m file and call it when an arrow hits the bird. After that, we will just add our particle image to the project and we are done. Refer to the following steps:

  1. We will start by adding the method that creates a particle system. Go ahead and open the Bird.m file, and add the following method right above the removeBird: method:
    -(void)explodeFeathers { //1 int totalNumberOfFeathers = 100; //2 CCParticleSystem *explosion = [CCParticleSystem ...

Get Learning iPhone Game Development with Cocos2D 3.0 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.