makeParticles(keys, frames, quantity, collide, collideWorldBounds) → {Phaser.Particles.Arcade.Emitter}
This function generates a new set of particles for use by this emitter.
The particles are stored internally waiting to be emitted via Emitter.start.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
keys | array | string | A string or an array of strings that the particle sprites will use as their texture. If an array one is picked at random. | ||
frames | array | number | <optional> | 0 | A frame number, or array of frames that the sprite will use. If an array one is picked at random. |
quantity | number | <optional> | The number of particles to generate. If not given it will use the value of Emitter.maxParticles. If the value is greater than Emitter.maxParticles it will use Emitter.maxParticles as the quantity. | |
collide | boolean | <optional> | false | If you want the particles to be able to collide with other Arcade Physics bodies then set this to true. |
collideWorldBounds | boolean | <optional> | false | A particle can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World. |
Returns
This Emitter instance.
- Source code: particles/arcade/Emitter.js (Line 335)
Please login to continue.