Update: CC - Mouse Down (zjg1mprub2.js) 33 bytes modified
parent
da322487f1
commit
3c7d94609c
|
@ -9,19 +9,12 @@ if (!this.initialized) {
|
||||||
this.throwerParticleEngine = this.entityLoaded.throwerParticleEngine;
|
this.throwerParticleEngine = this.entityLoaded.throwerParticleEngine;
|
||||||
this.beforeRender = this.entityLoaded.beforeRender;
|
this.beforeRender = this.entityLoaded.beforeRender;
|
||||||
this.mouseMove = this.entityLoaded.mouseMove;
|
this.mouseMove = this.entityLoaded.mouseMove;
|
||||||
this.initialized = true;
|
|
||||||
|
if (this.subscription) {
|
||||||
|
this.subscription.remove();
|
||||||
|
this.subscription = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.beforeRender.mouseIsDown = true;
|
|
||||||
this.mouseMove.mouseIsDown = true;
|
|
||||||
|
|
||||||
this.throwerParticleEngine.enabled = true;
|
|
||||||
this.throwerParticleEngine.particlesPerSecond = 50;
|
|
||||||
this.throwerParticleEngine.updateInstance('particlesPerSecond');
|
|
||||||
this.throwerParticleEngine.templateParticle.speed = 300;
|
|
||||||
this.throwerParticleEngine.templateParticle.scale.x = 15;
|
|
||||||
|
|
||||||
if (GameLib.Utils.UndefinedOrNull(this.subscription)) {
|
|
||||||
this.subscription = GameLib.Event.Subscribe(
|
this.subscription = GameLib.Event.Subscribe(
|
||||||
GameLib.Event.AUDIO_ENDED,
|
GameLib.Event.AUDIO_ENDED,
|
||||||
function(data) {
|
function(data) {
|
||||||
|
@ -34,8 +27,19 @@ if (GameLib.Utils.UndefinedOrNull(this.subscription)) {
|
||||||
}
|
}
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.beforeRender.mouseIsDown = true;
|
||||||
|
this.mouseMove.mouseIsDown = true;
|
||||||
|
|
||||||
|
this.throwerParticleEngine.enabled = true;
|
||||||
|
this.throwerParticleEngine.particlesPerSecond = 50;
|
||||||
|
this.throwerParticleEngine.updateInstance('particlesPerSecond');
|
||||||
|
this.throwerParticleEngine.templateParticle.speed = 300;
|
||||||
|
this.throwerParticleEngine.templateParticle.scale.x = 15;
|
||||||
|
|
||||||
GameLib.Event.Emit(
|
GameLib.Event.Emit(
|
||||||
GameLib.Event.PLAY_AUDIO,
|
GameLib.Event.PLAY_AUDIO,
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue