Skip to content

Commit fca695f

Browse files
committed
Removed Particle.index as it's no longer required
1 parent dbdfb0e commit fca695f

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

src/gameobjects/particles/Particle.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,6 @@ var Particle = new Class({
4747
*/
4848
this.frame = null;
4949

50-
/**
51-
* The position of this Particle within its Emitter's particle pool.
52-
*
53-
* @name Phaser.GameObjects.Particles.Particle#index
54-
* @type {number}
55-
* @default 0
56-
* @since 3.0.0
57-
*/
58-
this.index = 0;
59-
6050
/**
6151
* The x coordinate of this Particle.
6252
*
@@ -276,6 +266,18 @@ var Particle = new Class({
276266
return (this.lifeCurrent > 0);
277267
},
278268

269+
/**
270+
* Resets the position of this particle back to zero.
271+
*
272+
* @method Phaser.GameObjects.Particles.Particle#resetPosition
273+
* @since 3.16.0
274+
*/
275+
resetPosition: function ()
276+
{
277+
this.x = 0;
278+
this.y = 0;
279+
},
280+
279281
/**
280282
* Starts this Particle from the given coordinates.
281283
*
@@ -382,8 +384,6 @@ var Particle = new Class({
382384
this.alpha = emitter.alpha.onEmit(this, 'alpha');
383385

384386
this.tint = emitter.tint.onEmit(this, 'tint');
385-
386-
this.index = emitter.alive.length;
387387
},
388388

389389
/**

0 commit comments

Comments
 (0)