Skip to content

Commit 6f4f5b7

Browse files
authored
Merge pull request #22 from saqsun/master
added emit function to ParticleEffect to be abel to start emitters manually
2 parents e481d68 + 748925a commit 6f4f5b7

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@koreez/phaser-particle-editor-plugin",
3-
"version": "1.0.0-alpha.15",
3+
"version": "1.0.0-alpha.16",
44
"description": "Phaser Particle Editor Plugin",
55
"main": "dist/library.js",
66
"scripts": {

src/com/koreez/particleeditorplugin/ParticleEditorPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default class ParticleEditorPlugin extends Phaser.Plugin {
1313
return (group || this.game.world).add(particle)
1414
}
1515
Phaser.GameObjectCreator.prototype.particleEffect = (x, y, key) => {
16-
return new ParticleEffect(this.game, x, y, this.getData(key))
16+
return new ParticleEffect(this.game, this.getData(key), x, y)
1717
}
1818
}
1919

src/com/koreez/particleeditorplugin/ParticleEffect.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ export default class ParticleEffect extends Phaser.Group {
8383
}
8484
}
8585

86+
emit () {
87+
// eslint-disable-next-line no-unused-vars
88+
for (let [key, emitter] of this._emitersMap) {
89+
this._emit(emitter, emitter.properties)
90+
}
91+
}
92+
8693
_onEmitterImageUpdate (name, properties) {
8794
this._recreateEmitter(name, properties)
8895
}

0 commit comments

Comments
 (0)