Merge pull request #3783 from samme/feature/particle-emitter-stop

Add ParticleEmitter#stop()
This commit is contained in:
Richard Davey 2018-06-25 22:42:00 +01:00 committed by GitHub
commit 8391042ff9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -635,7 +635,7 @@ var ParticleEmitter = new Class({
/**
* Controls if the emitter is currently emitting a particle flow (when frequency >= 0).
* 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
* @type {boolean}
@ -1862,6 +1862,21 @@ var ParticleEmitter = new Class({
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.
*