Fixed a fantastic FrameData bug. Also added support to the Emitter to handle multiple image keys and/or frames.

This commit is contained in:
Richard Davey
2013-09-10 11:09:25 +01:00
parent 5d3fe891cd
commit 4f950ae801
10 changed files with 703 additions and 281 deletions
+39 -1
View File
@@ -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();
}
}
},
};