mirror of
https://github.com/wassname/phaser.git
synced 2026-07-01 16:50:43 +08:00
39 lines
448 B
JavaScript
39 lines
448 B
JavaScript
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();
|
|
}
|
|
}
|
|
|
|
},
|
|
|
|
}; |