September 2014
Beginner
266 pages
5h 38m
English
From the resources provided for the chapter, add the smoke.plist, smoke.png, dusts.plist, and dust.png files to the resources folder in the game.
Now, in the GameplayLayer.cpp file, add the following lines of code in the player rocket and enemy collision check right under where we increment the score:
CCParticleSystemQuad * smokeParticle = CCParticleSystemQuad::create("smoke.plist");
smokeParticle->setPosition(en->getPosition());
this->addChild(smokeParticle);
smokeParticle->setAutoRemoveOnFinish(true);
CCParticleSystemQuad * dustParticle = CCParticleSystemQuad::create("dusts.plist");
dustParticle->setPosition(en->getPosition());
this->addChild(dustParticle);
dustParticle->setAutoRemoveOnFinish(true);Here, we ...
Read now
Unlock full access