In this section, we will create a small mock particle system that will create an image of the enemy and gun and make it look as if she is spinning and falling down once hit by the rocket. As we have already deleted the enemy, we just have to spawn the new enemy and gun sprites and remove it from the display list after a while. For this, we will create a class that will take an image, spin it, and make it fall down.
Create a new class called
ParticleSpin and create the respective
.cpp files. Next, add the following to the
#ifndef __wp8Game__ParticleSpin__ #define __wp8Game__ParticleSpin__ class ProjectileObject; #include <iostream> #include "cocos2d.h" using namespace cocos2d; class ParticleSpin: ...