mirror of
https://github.com/wassname/phaser.git
synced 2026-09-11 12:31:29 +08:00
Fixed a fantastic FrameData bug. Also added support to the Emitter to handle multiple image keys and/or frames.
This commit is contained in:
@@ -1 +1,39 @@
|
||||
Phaser.Particles = {}
|
||||
Phaser.Particles = function (game) {
|
||||
|
||||
this.emitters = {};
|
||||
|
||||
this.ID = 0;
|
||||
|
||||
};
|
||||
|
||||
Phaser.Particles.prototype = {
|
||||
|
||||
emitters: null,
|
||||
|
||||
add: function (emitter) {
|
||||
|
||||
this.emitters[emitter.name] = emitter;
|
||||
|
||||
return emitter;
|
||||
|
||||
},
|
||||
|
||||
remove: function (emitter) {
|
||||
|
||||
delete this.emitters[emitter.name];
|
||||
|
||||
},
|
||||
|
||||
update: function () {
|
||||
|
||||
for (var key in this.emitters)
|
||||
{
|
||||
if (this.emitters[key].exists)
|
||||
{
|
||||
this.emitters[key].update();
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user