mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 13:43:26 +00:00
Merge pull request #3783 from samme/feature/particle-emitter-stop
Add ParticleEmitter#stop()
This commit is contained in:
commit
8391042ff9
1 changed files with 16 additions and 1 deletions
|
@ -635,7 +635,7 @@ var ParticleEmitter = new Class({
|
||||||
/**
|
/**
|
||||||
* Controls if the emitter is currently emitting a particle flow (when frequency >= 0).
|
* Controls if the emitter is currently emitting a particle flow (when frequency >= 0).
|
||||||
* Already alive particles will continue to update until they expire.
|
* Already alive particles will continue to update until they expire.
|
||||||
* Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#start}.
|
* Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#start} and {@link Phaser.GameObjects.Particles.ParticleEmitter#stop}.
|
||||||
*
|
*
|
||||||
* @name Phaser.GameObjects.Particles.ParticleEmitter#on
|
* @name Phaser.GameObjects.Particles.ParticleEmitter#on
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
|
@ -1862,6 +1862,21 @@ var ParticleEmitter = new Class({
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#on off} the emitter.
|
||||||
|
*
|
||||||
|
* @method Phaser.GameObjects.Particles.ParticleEmitter#stop
|
||||||
|
* @since 3.11.0
|
||||||
|
*
|
||||||
|
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
|
||||||
|
*/
|
||||||
|
stop: function ()
|
||||||
|
{
|
||||||
|
this.on = false;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link Phaser.GameObjects.Particles.ParticleEmitter#active Deactivates} the emitter.
|
* {@link Phaser.GameObjects.Particles.ParticleEmitter#active Deactivates} the emitter.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue