From 559c89eaf2e352496837dd637710a14c4c9f376d Mon Sep 17 00:00:00 2001 From: samme Date: Sun, 22 Dec 2019 17:00:51 -0800 Subject: [PATCH] Add ParticleEmitter#setTint() --- src/gameobjects/particles/ParticleEmitter.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/gameobjects/particles/ParticleEmitter.js b/src/gameobjects/particles/ParticleEmitter.js index e314595a9..2b74b7cb8 100644 --- a/src/gameobjects/particles/ParticleEmitter.js +++ b/src/gameobjects/particles/ParticleEmitter.js @@ -1323,6 +1323,23 @@ var ParticleEmitter = new Class({ return this; }, + /** + * Sets the color tint of emitted particles. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setTint + * @since 3.22.0 + * + * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 and 0xffffff. + * + * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + */ + setTint: function (value) + { + this.tint.onChange(value); + + return this; + }, + /** * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. *