mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 14:40:38 +00:00
Add methods to clear EmitZone or DeathZone
This commit is contained in:
parent
8e1306b78d
commit
1e4b807656
1 changed files with 32 additions and 0 deletions
|
@ -1730,6 +1730,21 @@ var ParticleEmitter = new Class({
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear all Particle Death Zone from this Emitter.
|
||||||
|
*
|
||||||
|
* @method Phaser.GameObjects.Particles.ParticleEmitter#clearDeathZone
|
||||||
|
* @since 3.60.0
|
||||||
|
*
|
||||||
|
* @return {this} This Particle Emitter.
|
||||||
|
*/
|
||||||
|
clearDeathZone: function ()
|
||||||
|
{
|
||||||
|
this.deathZones.length = 0;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a new Particle Emission Zone to this Emitter.
|
* Adds a new Particle Emission Zone to this Emitter.
|
||||||
*
|
*
|
||||||
|
@ -1820,6 +1835,23 @@ var ParticleEmitter = new Class({
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear all Particle Emission Zone from this Emitter.
|
||||||
|
*
|
||||||
|
* @method Phaser.GameObjects.Particles.ParticleEmitter#clearEmitZone
|
||||||
|
* @since 3.60.0
|
||||||
|
*
|
||||||
|
* @return {this} This Particle Emitter.
|
||||||
|
*/
|
||||||
|
clearEmitZone: function ()
|
||||||
|
{
|
||||||
|
this.emitZones.length = 0;
|
||||||
|
|
||||||
|
this.zoneIndex = 0;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Takes the given particle and sets its x/y coordinates to match the next available
|
* Takes the given particle and sets its x/y coordinates to match the next available
|
||||||
* emission zone, if any have been configured. This method is called automatically
|
* emission zone, if any have been configured. This method is called automatically
|
||||||
|
|
Loading…
Reference in a new issue