spritebuilder_cocos2dx icon indicating copy to clipboard operation
spritebuilder_cocos2dx copied to clipboard

emissionRate broken

Open delazarus opened this issue 10 years ago • 1 comments

Hi

At case ((ParticleSystemQuad *)pNode)->setEmissionRate(pFloat); is called before the ((ParticleSystemQuad *)pNode)->setTotalParticles(pInteger);

_emissionRate became broken, because: void ParticleSystemQuad::setTotalParticles(int tp) { ... _emissionRate = _totalParticles / _life; <------ _life = 0, _emission rate is overrided with incorrect value. resetSystem(); }

delazarus avatar Jul 06 '14 19:07 delazarus

Thank you I will fix it soon

-Duong

On Mon, Jul 7, 2014 at 2:33 AM, delazarus [email protected] wrote:

Hi

At case ((ParticleSystemQuad *)pNode)->setEmissionRate(pFloat); is called before the ((ParticleSystemQuad *)pNode)->setTotalParticles(pInteger);

_emissionRate became broken, because: void ParticleSystemQuad::setTotalParticles(int tp) { ... _emissionRate = _totalParticles / _life; <------ _life = 0, _emission rate is overrided with incorrect value. resetSystem(); }

— Reply to this email directly or view it on GitHub https://github.com/nguyenduong/spritebuilder_cocos2dx/issues/8.

Thai-Duong Nguyen Phone#: +84-965-233-668 email: [email protected] home: jacos2d-x.org

nguyenduong avatar Jul 07 '14 01:07 nguyenduong