emitParticle(x, y, key, frame) → {boolean}
This function is used internally to emit the next particle in the queue.
However it can also be called externally to emit a particle.
When called externally you can use the arguments to override any defaults the Emitter has set.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
x | number | <optional> | The x coordinate to emit the particle from. If |
y | number | <optional> | The y coordinate to emit the particle from. If |
key | string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture | <optional> | This is the image or texture used by the Particle during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
frame | string | number | <optional> | If this Particle is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. |
Returns
True if a particle was emitted, otherwise false.
- Source code: particles/arcade/Emitter.js (Line 553)
Please login to continue.