Hi all, I would like to share a class which I wrote. Its called AdvanceParticleQuadSystem and its basically an easier way to animate particles. You can do things like setting frame rate. Its like CCParticleSystemQuad and has additional thing to animate particles using texture or CCsprite.
Animation of Particles:
It extends from CCParticleSystem and has all properties included in CCParticleSystem. Using of this class is similar to CCParticleSystemQuad.
Its has all settings declared in CCParticleSystem.
1. Setting Frame rate.
2. Particle animation.
3. Recycle particle after finish animaiton.
4. Repeat animation until life to 0.
I had declared two function instead of setDisplayFrame and setTextureWithRect in CCParticleSystemQuad as setDisplayFrameForAnimation and setTextureWithRectForAnimation in AdvanceParticleQuadSystem
//Create class which extends from AdvanceParticleQuadSystem to set properties to CCParticleSystem.
//ParticleEmitter class which extends from AdvanceParticleQuadSystem.
myEmmiter = new ParticleEmitter();
ccColor4F m_StartColor = ;
ccColor4F m_Variancecolor = ;
//Settings Texture and number of tile images along row nad column, frame rate and Boolean to recycle particle after animation.
myEmmiter->setTextureWithRectForAnimation(CCTexture2D *texture, CCRect rect, int tileWidth, int tileHeight, int number_Frames_per_Second, bool NeedsToRemoveParticleAfterAniamtion);
Advance_Particle_Quad_System.zip (264.7 KB)