forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Emitter now has minParticleAlpha and maxParticleAlpha values for sett…
…ing a random alpha on emitted particles. Emitter.particleAnchor allows you to control the anchor of emitted Particles. Defaults to 0.5 (same as before) but now under your control. Emitter now emits Phaser.Particle objects instead of Phaser.Sprites, which can be extended as required. Emitter has had various local properties removed that were already declared in Phaser.Group which it extends.
- Loading branch information
1 parent
73d0414
commit 50981fd
Showing
6 changed files
with
150 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* @author Richard Davey <[email protected]> | ||
* @copyright 2014 Photon Storm Ltd. | ||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} | ||
*/ | ||
|
||
/** | ||
* @class Phaser.Particle | ||
* | ||
* @classdesc Create a new `Particle` object. Particles are extended Sprites that are emitted by a particle emitter. | ||
* | ||
* @constructor | ||
* @extends Phaser.Sprite | ||
* @param {Phaser.Game} game - A reference to the currently running game. | ||
* @param {number} x - The x coordinate (in world space) to position the Sprite at. | ||
* @param {number} y - The y coordinate (in world space) to position the Sprite at. | ||
* @param {string|Phaser.RenderTexture|Phaser.BitmapData|PIXI.Texture} key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. | ||
* @param {string|number} frame - If this Sprite 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. | ||
*/ | ||
Phaser.Particle = function (game, x, y, key, frame) { | ||
|
||
Phaser.Sprite.call(this, game, x, y, key, frame); | ||
|
||
} | ||
|
||
Phaser.Particle.prototype = Object.create(Phaser.Sprite.prototype); | ||
Phaser.Particle.prototype.constructor = Phaser.Particle; | ||
|
||
/** | ||
* Override and use this function in your own custom objects to handle any update requirements you may have. | ||
* | ||
* @method Phaser.Particle#update | ||
* @memberof Phaser.Particle | ||
*/ | ||
Phaser.Particle.prototype.update = function() { | ||
|
||
|
||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters