mirror of
https://github.com/photonstorm/phaser
synced 2024-11-15 09:27:37 +00:00
Return array of zones
This commit is contained in:
parent
1867bfd7da
commit
63a852779a
1 changed files with 7 additions and 4 deletions
|
@ -1462,8 +1462,8 @@ var ParticleEmitter = new Class({
|
|||
* @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleSpeed
|
||||
* @since 3.60.0
|
||||
*
|
||||
* @param {number} x - The horizontal scale of the emitted Particles.
|
||||
* @param {number} [y=x] - The vertical scale of emitted Particles. If not set it will use the `x` value.
|
||||
* @param {number} x - The horizontal speed of the emitted Particles.
|
||||
* @param {number} [y=x] - The vertical speed of emitted Particles. If not set it will use the `x` value.
|
||||
*
|
||||
* @return {this} This Particle Emitter.
|
||||
*/
|
||||
|
@ -1747,7 +1747,7 @@ var ParticleEmitter = new Class({
|
|||
*
|
||||
* @param {Phaser.Types.GameObjects.Particles.EmitZoneObject|Phaser.Types.GameObjects.Particles.EmitZoneObject[]} zone - An Emission Zone configuration object, a RandomZone or EdgeZone instance, or an array of them.
|
||||
*
|
||||
* @return {Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone} The Emission Zone that was added to this Emitter.
|
||||
* @return {Phaser.GameObjects.Particles.Zones.EdgeZone[]|Phaser.GameObjects.Particles.Zones.RandomZone[]} An array of the Emission Zones that were added to this Emitter.
|
||||
*/
|
||||
addEmitZone: function (config)
|
||||
{
|
||||
|
@ -1758,6 +1758,7 @@ var ParticleEmitter = new Class({
|
|||
|
||||
var zone;
|
||||
var emitZones = this.emitZones;
|
||||
var output = [];
|
||||
|
||||
for (var i = 0; i < config.length; i++)
|
||||
{
|
||||
|
@ -1796,9 +1797,11 @@ var ParticleEmitter = new Class({
|
|||
emitZones.push(zone);
|
||||
}
|
||||
}
|
||||
|
||||
output.push(zone);
|
||||
}
|
||||
|
||||
return zone;
|
||||
return output;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue