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)
Please login to continue.