mirror of
https://github.com/photonstorm/phaser
synced 2025-02-26 04:17:08 +00:00
Emitter sends the processors to the particles
This commit is contained in:
parent
80374dd8d5
commit
a6578562f2
1 changed files with 4 additions and 1 deletions
|
@ -639,6 +639,9 @@ var ParticleEmitter = new Class({
|
||||||
this.visible = this.follow.visible;
|
this.visible = this.follow.visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Any particle processors?
|
||||||
|
var processors = this.manager.getProcessors();
|
||||||
|
|
||||||
var particles = this.alive;
|
var particles = this.alive;
|
||||||
var length = particles.length;
|
var length = particles.length;
|
||||||
|
|
||||||
|
@ -647,7 +650,7 @@ var ParticleEmitter = new Class({
|
||||||
var particle = particles[index];
|
var particle = particles[index];
|
||||||
|
|
||||||
// update returns `true` if the particle is now dead (lifeStep < 0)
|
// update returns `true` if the particle is now dead (lifeStep < 0)
|
||||||
if (particle.update(delta, step))
|
if (particle.update(delta, step, processors))
|
||||||
{
|
{
|
||||||
// Moves the dead particle to the end of the particles array (ready for splicing out later)
|
// Moves the dead particle to the end of the particles array (ready for splicing out later)
|
||||||
var last = particles[length - 1];
|
var last = particles[length - 1];
|
||||||
|
|
Loading…
Add table
Reference in a new issue