how to use original color layer for sprite in particle systems

Hi,
I am trying to build a particle explosion system like the sample. I have my own particle png file and initialize the particle texture with the file. But how can I display it with its own color layer? I extract the color by CCSprite::getColor() and then CCParticleSystems::setColor() but the particle effect is still colorful. What can I do to solve the issue? Thanks.

You need used methods CCParticleSystems for set particle of color, setStartColor(),setStartColorVar(),setEndColor(),setEndColorVar()
sample:
m_emitter~~>setStartColor); //blue color of the start
m_emitter~~>setStartColorVar((ccColor4F){0,0.0,0,0.0});//don’t variable start color
m_emitter~~>setEndColor);//green color of the end
m_emitter~~>setEndColorVar((ccColor4F){0,0.0,0,0.0});//don’t variable end color

ParticleSystem don’t have can set color for whole system , only for every particles individually.

Misha Philypchuk wrote:

You need used methods CCParticleSystems for set particle of color, setStartColor(),setStartColorVar(),setEndColor(),setEndColorVar()
sample:
m_emitter~~>setStartColor); //blue color of the start
m_emitter~~>setStartColorVar((ccColor4F){0,0.0,0,0.0});//don’t variable start color
m_emitter~~>setEndColor);//green color of the end
m_emitter~~>setEndColorVar((ccColor4F){0,0.0,0,0.0});//don’t variable end color
>
ParticleSystem don’t have can set color for whole system , only for every particles individually.

Thanks for your kindly information. Make StartColorVar and EndColorVar ccColor4F(0,0,0,0) really helps. But I have another problem. It seems that the particle sprite looks blur but not so clear as its original. What parameter should I adjust to make it not blur? Thanks.

ParticleSystem don’t have parameter of blur.
It’s maybe texture with bluring.
You have changes the texture emiter->setTexture(“”);
ParticleSystem have one visual effect it’s blending //true or false