mirror of https://github.com/axmolengine/axmol.git
issue #3990: setTotalParticles works as expected. _emissionRate has to be updated in setTotalParticles.
This commit is contained in:
parent
67630311f2
commit
4837b2dd2d
|
@ -527,6 +527,7 @@ void ParticleSystemQuad::setTotalParticles(int tp)
|
|||
_totalParticles = tp;
|
||||
}
|
||||
|
||||
_emissionRate = _totalParticles / _life;
|
||||
resetSystem();
|
||||
}
|
||||
|
||||
|
|
|
@ -1905,7 +1905,6 @@ void Issue3990::onEnter()
|
|||
|
||||
_emitter->setPositionType(ParticleSystem::PositionType::GROUPED);
|
||||
_emitter->setTotalParticles(1000);
|
||||
_emitter->setLife(20);
|
||||
|
||||
_emitter->setPosition(VisibleRect::center());
|
||||
|
||||
|
|
Loading…
Reference in New Issue