mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 09:48:18 +00:00
Allow particle frequency smaller than delta
This commit is contained in:
parent
dfaa91b48c
commit
f393cb9c43
1 changed files with 2 additions and 2 deletions
|
@ -2046,12 +2046,12 @@ var ParticleEmitter = new Class({
|
|||
{
|
||||
this._counter -= delta;
|
||||
|
||||
if (this._counter <= 0)
|
||||
while (this._counter <= 0)
|
||||
{
|
||||
this.emitParticle();
|
||||
|
||||
// counter = frequency - remained from previous delta
|
||||
this._counter = (this.frequency - Math.abs(this._counter));
|
||||
this._counter += this.frequency;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue