new Particles(game)
Phaser.Particles is the Particle Manager for the game. It is called during the game update loop and in turn updates any Emitters attached to it.
Parameters
Name | Type | Description |
---|---|---|
game |
Phaser.Game | A reference to the currently running game. |
- Source code: particles/Particles.js (Line 14)
Classes
Public Properties
-
emitters : Object
-
Internal emitters store.
- Source code: particles/Particles.js (Line 24)
-
game : Phaser.Game
-
A reference to the currently running Game.
- Source code: particles/Particles.js (Line 19)
-
ID : number
-
-
- Default Value
- 0
- Source code: particles/Particles.js (Line 30)
Public Methods
-
add(emitter) → {Phaser.Emitter}
-
Adds a new Particle Emitter to the Particle Manager.
Parameters
Name Type Description emitter
Phaser.Emitter The emitter to be added to the particle manager.
Returns
Phaser.Emitter -The emitter that was added.
- Source code: particles/Particles.js (Line 36)
-
remove(emitter)
-
Removes an existing Particle Emitter from the Particle Manager.
Parameters
Name Type Description emitter
Phaser.Emitter The emitter to remove.
- Source code: particles/Particles.js (Line 50)
-
<internal> update()
-
Called by the core game loop. Updates all Emitters who have their exists value set to true.
- Internal:
- This member is internal (protected) and may be modified or removed in the future.
- Source code: particles/Particles.js (Line 61)