mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 14:38:30 +00:00
Documented the remaining ParticleEmitter Zone classes.
This commit is contained in:
parent
583d464230
commit
978f982c26
4 changed files with 73 additions and 68 deletions
|
@ -37,10 +37,10 @@ var Wrap = require('../../math/Wrap');
|
|||
/**
|
||||
* @typedef {object} ParticleEmitterBounds
|
||||
*
|
||||
* @property {float} x - The left edge of the rectangle.
|
||||
* @property {float} y - The top edge of the rectangle.
|
||||
* @property {float} width - The width of the rectangle.
|
||||
* @property {float} height - The height of the rectangle.
|
||||
* @property {number} x - The left edge of the rectangle.
|
||||
* @property {number} y - The top edge of the rectangle.
|
||||
* @property {number} width - The width of the rectangle.
|
||||
* @property {number} height - The height of the rectangle.
|
||||
*
|
||||
* @see Phaser.GameObjects.Particles.ParticleEmitter#setBounds
|
||||
*/
|
||||
|
@ -48,10 +48,10 @@ var Wrap = require('../../math/Wrap');
|
|||
/**
|
||||
* @typedef {object} ParticleEmitterBoundsAlt
|
||||
*
|
||||
* @property {float} x - The left edge of the rectangle.
|
||||
* @property {float} y - The top edge of the rectangle.
|
||||
* @property {float} w - The width of the rectangle.
|
||||
* @property {float} h - The height of the rectangle.
|
||||
* @property {number} x - The left edge of the rectangle.
|
||||
* @property {number} y - The top edge of the rectangle.
|
||||
* @property {number} w - The width of the rectangle.
|
||||
* @property {number} h - The height of the rectangle.
|
||||
*
|
||||
* @see Phaser.GameObjects.Particles.ParticleEmitter#setBounds
|
||||
*/
|
||||
|
@ -69,7 +69,7 @@ var Wrap = require('../../math/Wrap');
|
|||
* @property {EdgeZoneSource} source - A shape representing the zone. See {@link Phaser.GameObjects.Particles.Zones.EdgeZone#source}.
|
||||
* @property {string} type - 'edge'.
|
||||
* @property {integer} quantity - The number of particles to place on the source edge. Set to 0 to use `stepRate` instead.
|
||||
* @property {float} [stepRate] - The distance between each particle. When set, `quantity` is implied and should be set to 0.
|
||||
* @property {number} [stepRate] - The distance between each particle. When set, `quantity` is implied and should be set to 0.
|
||||
* @property {boolean} [yoyo=false] - Whether particles are placed from start to end and then end to start.
|
||||
* @property {boolean} [seamless=true] - Whether one endpoint will be removed if it's identical to the other.
|
||||
*/
|
||||
|
@ -96,45 +96,45 @@ var Wrap = require('../../math/Wrap');
|
|||
* @property {function} [emitCallback] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#emitCallback}.
|
||||
* @property {*} [emitCallbackScope] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#emitCallbackScope}.
|
||||
* @property {Phaser.GameObjects.GameObject} [follow] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#follow}.
|
||||
* @property {float} [frequency] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency}.
|
||||
* @property {float} [gravityX] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#gravityX}.
|
||||
* @property {float} [gravityY] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#gravityY}.
|
||||
* @property {number} [frequency] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency}.
|
||||
* @property {number} [gravityX] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#gravityX}.
|
||||
* @property {number} [gravityY] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#gravityY}.
|
||||
* @property {integer} [maxParticles] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxParticles}.
|
||||
* @property {string} [name] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#name}.
|
||||
* @property {boolean} [on] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#on}.
|
||||
* @property {boolean} [particleBringToTop] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleBringToTop}.
|
||||
* @property {Phaser.GameObjects.Particles.Particle} [particleClass] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleClass}.
|
||||
* @property {boolean} [radial] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#radial}.
|
||||
* @property {float} [timeScale] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#timeScale}.
|
||||
* @property {number} [timeScale] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#timeScale}.
|
||||
* @property {boolean} [trackVisible] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#trackVisible}.
|
||||
* @property {boolean} [visible] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#visible}.
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [accelerationX] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#accelerationX} (emit only).
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [accelerationY] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#accelerationY} (emit only).
|
||||
* @property {float|float[]|EmitterOpOnUpdateCallback|object} [alpha] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#alpha}.
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [angle] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#angle} (emit only)
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [bounce] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#bounce} (emit only).
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [delay] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#delay} (emit only).
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [lifespan] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#lifespan} (emit only).
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [maxVelocityX] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityX} (emit only).
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [maxVelocityY] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityY} (emit only).
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [moveToX] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#moveToX} (emit only).
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [moveToY] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#moveToY} (emit only).
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [quantity] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity} (emit only).
|
||||
* @property {float|float[]|EmitterOpOnUpdateCallback|object} [rotate] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#rotate}.
|
||||
* @property {float|float[]|EmitterOpOnUpdateCallback|object} [scale] - As {@link Phaser.GameObjects.Particles.ParticleEmitter#setScale}.
|
||||
* @property {float|float[]|EmitterOpOnUpdateCallback|object} [scaleX] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#scaleX}.
|
||||
* @property {float|float[]|EmitterOpOnUpdateCallback|object} [scaleY] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#scaleY}.
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [speed] - As {@link Phaser.GameObjects.Particles.ParticleEmitter#setSpeed} (emit only).
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [speedX] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#speedX} (emit only).
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [speedY] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#speedY} (emit only).
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [tint] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#tint}.
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [x] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#x} (emit only).
|
||||
* @property {float|float[]|EmitterOpOnEmitCallback|object} [y] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#y} (emit only).
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [accelerationX] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#accelerationX} (emit only).
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [accelerationY] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#accelerationY} (emit only).
|
||||
* @property {number|number[]|EmitterOpOnUpdateCallback|object} [alpha] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#alpha}.
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [angle] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#angle} (emit only)
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [bounce] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#bounce} (emit only).
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [delay] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#delay} (emit only).
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [lifespan] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#lifespan} (emit only).
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [maxVelocityX] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityX} (emit only).
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [maxVelocityY] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityY} (emit only).
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [moveToX] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#moveToX} (emit only).
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [moveToY] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#moveToY} (emit only).
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [quantity] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity} (emit only).
|
||||
* @property {number|number[]|EmitterOpOnUpdateCallback|object} [rotate] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#rotate}.
|
||||
* @property {number|number[]|EmitterOpOnUpdateCallback|object} [scale] - As {@link Phaser.GameObjects.Particles.ParticleEmitter#setScale}.
|
||||
* @property {number|number[]|EmitterOpOnUpdateCallback|object} [scaleX] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#scaleX}.
|
||||
* @property {number|number[]|EmitterOpOnUpdateCallback|object} [scaleY] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#scaleY}.
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [speed] - As {@link Phaser.GameObjects.Particles.ParticleEmitter#setSpeed} (emit only).
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [speedX] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#speedX} (emit only).
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [speedY] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#speedY} (emit only).
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [tint] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#tint}.
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [x] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#x} (emit only).
|
||||
* @property {number|number[]|EmitterOpOnEmitCallback|object} [y] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#y} (emit only).
|
||||
* @property {object} [emitZone] - As {@link Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone}.
|
||||
* @property {ParticleEmitterBounds|ParticleEmitterBoundsAlt} [bounds] - As {@link Phaser.GameObjects.Particles.ParticleEmitter#setBounds}.
|
||||
* @property {object} [followOffset] - Assigns to {@link Phaser.GameObjects.Particles.ParticleEmitter#followOffset}.
|
||||
* @property {float} [followOffset.x] - x-coordinate of the offset.
|
||||
* @property {float} [followOffset.y] - y-coordinate of the offset.
|
||||
* @property {number} [followOffset.x] - x-coordinate of the offset.
|
||||
* @property {number} [followOffset.y] - y-coordinate of the offset.
|
||||
* @property {number|number[]|string|string[]|Phaser.Textures.Frame|Phaser.Textures.Frame[]|ParticleEmitterFrameConfig} [frames] - Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}.
|
||||
*/
|
||||
|
||||
|
@ -337,7 +337,7 @@ var ParticleEmitter = new Class({
|
|||
* Horizontal acceleration applied to emitted particles, in pixels per second squared.
|
||||
*
|
||||
* @name Phaser.GameObjects.Particles.ParticleEmitter#gravityX
|
||||
* @type {float}
|
||||
* @type {number}
|
||||
* @default 0
|
||||
* @since 3.0.0
|
||||
* @see Phaser.GameObjects.Particles.ParticleEmitter#setGravity
|
||||
|
@ -348,7 +348,7 @@ var ParticleEmitter = new Class({
|
|||
* Vertical acceleration applied to emitted particles, in pixels per second squared.
|
||||
*
|
||||
* @name Phaser.GameObjects.Particles.ParticleEmitter#gravityY
|
||||
* @type {float}
|
||||
* @type {number}
|
||||
* @default 0
|
||||
* @since 3.0.0
|
||||
* @see Phaser.GameObjects.Particles.ParticleEmitter#setGravity
|
||||
|
@ -659,7 +659,7 @@ var ParticleEmitter = new Class({
|
|||
* The time rate applied to active particles, affecting lifespan, movement, and tweens. Values larger than 1 are faster than normal.
|
||||
*
|
||||
* @name Phaser.GameObjects.Particles.ParticleEmitter#timeScale
|
||||
* @type {float}
|
||||
* @type {number}
|
||||
* @default 1
|
||||
* @since 3.0.0
|
||||
*/
|
||||
|
@ -863,7 +863,7 @@ var ParticleEmitter = new Class({
|
|||
* The time until the next flow cycle.
|
||||
*
|
||||
* @name Phaser.GameObjects.Particles.ParticleEmitter#_counter
|
||||
* @type {float}
|
||||
* @type {number}
|
||||
* @private
|
||||
* @default 0
|
||||
* @since 3.0.0
|
||||
|
@ -1048,8 +1048,8 @@ var ParticleEmitter = new Class({
|
|||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.GameObjects.GameObject} target - The Game Object to follow.
|
||||
* @param {float} [offsetX=0] - Horizontal offset of the particle origin from the Game Object.
|
||||
* @param {float} [offsetY=0] - Vertical offset of the particle origin from the Game Object.
|
||||
* @param {number} [offsetX=0] - Horizontal offset of the particle origin from the Game Object.
|
||||
* @param {number} [offsetY=0] - Vertical offset of the particle origin from the Game Object.
|
||||
* @param {boolean} [trackVisible=false] - Whether the emitter's visible state will track the target's visible state.
|
||||
*
|
||||
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
|
||||
|
|
|
@ -9,10 +9,10 @@ var Class = require('../../../utils/Class');
|
|||
/**
|
||||
* @callback EdgeZoneSourceCallback
|
||||
*
|
||||
* @param {integer} quantity - [description]
|
||||
* @param {integer} [stepRate] - [description]
|
||||
* @param {integer} quantity - The number of particles to place on the source edge. If 0, `stepRate` should be used instead.
|
||||
* @param {number} [stepRate] - The distance between each particle. When set, `quantity` is implied and should be set to 0.
|
||||
*
|
||||
* @return {Phaser.Geom.Point[]} - [description]
|
||||
* @return {Phaser.Geom.Point[]} - The points placed on the source edge.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -40,10 +40,10 @@ var Class = require('../../../utils/Class');
|
|||
* @since 3.0.0
|
||||
*
|
||||
* @param {EdgeZoneSource} source - An object instance with a `getPoints(quantity, stepRate)` method returning an array of points.
|
||||
* @param {number} quantity - [description]
|
||||
* @param {number} stepRate - [description]
|
||||
* @param {boolean} [yoyo=false] - [description]
|
||||
* @param {boolean} [seamless=true] - [description]
|
||||
* @param {integer} quantity - The number of particles to place on the source edge. Set to 0 to use `stepRate` instead.
|
||||
* @param {number} stepRate - The distance between each particle. When set, `quantity` is implied and should be set to 0.
|
||||
* @param {boolean} [yoyo=false] - Whether particles are placed from start to end and then end to start.
|
||||
* @param {boolean} [seamless=true] - Whether one endpoint will be removed if it's identical to the other.
|
||||
*/
|
||||
var EdgeZone = new Class({
|
||||
|
||||
|
@ -55,7 +55,7 @@ var EdgeZone = new Class({
|
|||
if (seamless === undefined) { seamless = true; }
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* An object instance with a `getPoints(quantity, stepRate)` method returning an array of points.
|
||||
*
|
||||
* @name Phaser.GameObjects.Particles.Zones.EdgeZone#source
|
||||
* @type {EdgeZoneSource|RandomZoneSource}
|
||||
|
@ -64,7 +64,7 @@ var EdgeZone = new Class({
|
|||
this.source = source;
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* The points placed on the source edge.
|
||||
*
|
||||
* @name Phaser.GameObjects.Particles.Zones.EdgeZone#points
|
||||
* @type {Phaser.Geom.Point[]}
|
||||
|
@ -74,16 +74,16 @@ var EdgeZone = new Class({
|
|||
this.points = [];
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* The number of particles to place on the source edge. Set to 0 to use `stepRate` instead.
|
||||
*
|
||||
* @name Phaser.GameObjects.Particles.Zones.EdgeZone#quantity
|
||||
* @type {number}
|
||||
* @type {integer}
|
||||
* @since 3.0.0
|
||||
*/
|
||||
this.quantity = quantity;
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* The distance between each particle. When set, `quantity` is implied and should be set to 0.
|
||||
*
|
||||
* @name Phaser.GameObjects.Particles.Zones.EdgeZone#stepRate
|
||||
* @type {number}
|
||||
|
@ -92,7 +92,7 @@ var EdgeZone = new Class({
|
|||
this.stepRate = stepRate;
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Whether particles are placed from start to end and then end to start.
|
||||
*
|
||||
* @name Phaser.GameObjects.Particles.Zones.EdgeZone#yoyo
|
||||
* @type {boolean}
|
||||
|
@ -101,7 +101,7 @@ var EdgeZone = new Class({
|
|||
this.yoyo = yoyo;
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* The counter used for iterating the EdgeZone's points.
|
||||
*
|
||||
* @name Phaser.GameObjects.Particles.Zones.EdgeZone#counter
|
||||
* @type {number}
|
||||
|
@ -111,7 +111,7 @@ var EdgeZone = new Class({
|
|||
this.counter = -1;
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Whether one endpoint will be removed if it's identical to the other.
|
||||
*
|
||||
* @name Phaser.GameObjects.Particles.Zones.EdgeZone#seamless
|
||||
* @type {boolean}
|
||||
|
@ -120,7 +120,7 @@ var EdgeZone = new Class({
|
|||
this.seamless = seamless;
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* An internal count of the points belonging to this EdgeZone.
|
||||
*
|
||||
* @name Phaser.GameObjects.Particles.Zones.EdgeZone#_length
|
||||
* @type {number}
|
||||
|
@ -131,6 +131,8 @@ var EdgeZone = new Class({
|
|||
this._length = 0;
|
||||
|
||||
/**
|
||||
* An internal value used to keep track of the current iteration direction for the EdgeZone's points.
|
||||
*
|
||||
* 0 = forwards, 1 = backwards
|
||||
*
|
||||
* @name Phaser.GameObjects.Particles.Zones.EdgeZone#_direction
|
||||
|
@ -145,7 +147,10 @@ var EdgeZone = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Update the {@link Phaser.GameObjects.Particles.Zones.EdgeZone#points} from the EdgeZone's
|
||||
* {@link Phaser.GameObjects.Particles.Zones.EdgeZone#source}.
|
||||
*
|
||||
* Also updates internal properties.
|
||||
*
|
||||
* @method Phaser.GameObjects.Particles.Zones.EdgeZone#updateSource
|
||||
* @since 3.0.0
|
||||
|
@ -182,12 +187,12 @@ var EdgeZone = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Change the EdgeZone's source.
|
||||
*
|
||||
* @method Phaser.GameObjects.Particles.Zones.EdgeZone#changeSource
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {object} source - [description]
|
||||
* @param {EdgeZoneSource} source - An object instance with a `getPoints(quantity, stepRate)` method returning an array of points.
|
||||
*
|
||||
* @return {Phaser.GameObjects.Particles.Zones.EdgeZone} This Edge Zone.
|
||||
*/
|
||||
|
@ -199,12 +204,12 @@ var EdgeZone = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Get the next point in the Zone and set its coordinates on the given Particle.
|
||||
*
|
||||
* @method Phaser.GameObjects.Particles.Zones.EdgeZone#getPoint
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.GameObjects.Particles.Particle} particle - [description]
|
||||
* @param {Phaser.GameObjects.Particles.Particle} particle - The Particle.
|
||||
*/
|
||||
getPoint: function (particle)
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@ var RandomZone = new Class({
|
|||
function RandomZone (source)
|
||||
{
|
||||
/**
|
||||
* [description]
|
||||
* An object instance with a `getRandomPoint(point)` method.
|
||||
*
|
||||
* @name Phaser.GameObjects.Particles.Zones.RandomZone#source
|
||||
* @type {RandomZoneSource}
|
||||
|
@ -64,12 +64,12 @@ var RandomZone = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Get the next point in the Zone and set its coordinates on the given Particle.
|
||||
*
|
||||
* @method Phaser.GameObjects.Particles.Zones.RandomZone#getPoint
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.GameObjects.Particles.Particle} particle - [description]
|
||||
* @param {Phaser.GameObjects.Particles.Particle} particle - The Particle.
|
||||
*/
|
||||
getPoint: function (particle)
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* @param {integer} [startIndex=0] - An optional start index.
|
||||
* @param {integer} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.
|
||||
*
|
||||
* @return {object} A random element from the array, or `null` if no element could be found in the range given.
|
||||
* @return {*} A random element from the array, or `null` if no element could be found in the range given.
|
||||
*/
|
||||
var GetRandom = function (array, startIndex, length)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue