Particle#reset()

reset(x, y, health) → {Phaser.Particle}

Resets the Particle. This places the Particle at the given x/y world coordinates and then
sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values.
If the Particle has a physics body that too is reset.

Parameters
Name Type Argument Default Description
x number

The x coordinate (in world space) to position the Particle at.

y number

The y coordinate (in world space) to position the Particle at.

health number <optional>
1

The health to give the Particle.

Returns

This instance.

Source code: gameobjects/Particle.js (Line 141)
doc_phaser
2017-02-14 10:56:17
Comments
Leave a Comment

Please login to continue.