issue #3990: setTotalParticles works as expected. _emissionRate has to be updated in setTotalParticles.

This commit is contained in:
James Chen 2014-02-13 17:01:38 +08:00
parent 67630311f2
commit 4837b2dd2d
2 changed files with 1 additions and 1 deletions

View File

@ -527,6 +527,7 @@ void ParticleSystemQuad::setTotalParticles(int tp)
_totalParticles = tp;
}
_emissionRate = _totalParticles / _life;
resetSystem();
}

View File

@ -1905,7 +1905,6 @@ void Issue3990::onEnter()
_emitter->setPositionType(ParticleSystem::PositionType::GROUPED);
_emitter->setTotalParticles(1000);
_emitter->setLife(20);
_emitter->setPosition(VisibleRect::center());