Skip to Main Content
Learning iPhone Game Development with Cocos2D 3.0
book

Learning iPhone Game Development with Cocos2D 3.0

by Kirill Muzykov
June 2014
Beginner to intermediate content levelBeginner to intermediate
434 pages
9h 49m
English
Packt Publishing
Content preview from Learning iPhone Game Development with Cocos2D 3.0

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Swift Games Development for iOS: Develop 2D and 3D games Using Apple's SceneKit and SpriteKit

Beginning Swift Games Development for iOS: Develop 2D and 3D games Using Apple's SceneKit and SpriteKit

James Goodwill, Wesley Matlock

Publisher Resources

ISBN: 9781782160144Supplemental Content