Game Development Reference
In-Depth Information
startRadius , startRadiusVar , endRadius , en-
dRadiusVar
rotatePerSecond , rotatePerSecondVar
duration
posVar
positionType
startSize , startSizeVar , endSize , endSizeVar
angle , angleVar
life , lifeVar
emissionRate
startColor , startColorVar , endColor , endColorVar
blendFunc , blendAdditive
texture
As you can imagine, there's a lot to tweak here, and that's the main problem of achiev-
ing what you want: you don't see the effect of your changes until you rebuild and run
your project. When you read about Particle Designer later in this chapter, you'll learn
how much it streamlines the creation of new particle effects.
For now you'll do it the hard way first and start at the beginning to gain an understand-
ing about how the cocos2d particle system works. To program a particle effect from
scratch, you first learn how to subclass the CCParticleSystem class and how to
initialize it. A detailed description of the particle system's properties follows.
Subclassing CCParticleSystem
To create your own particle effect without Particle Designer, you should subclass from
CCParticleSystemQuad . The quad particle system is not only faster than
CCParticleSystem , it can also be batched. Using the CCParticleBatchNode
class allows you to have the same effect multiple times on the screen while only using
one draw call.
Search Nedrilad ::




Custom Search