Particle#Particle

new Particle(game, x, y, key, frame)

Create a new Particle object. Particles are extended Sprites that are emitted by a particle emitter such as Phaser.Particles.Arcade.Emitter.

Parameters
Name Type Description
game Phaser.Game

A reference to the currently running game.

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.

key string | Phaser.RenderTexture | Phaser.BitmapData | PIXI.Texture

This is the image or texture used by the Particle during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.

frame string | number

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.

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

Please login to continue.