Update: CC - Mouse Down (zjg1mprub2.js) 33 bytes modified

beta.r3js.org
-=yb4f310 2017-11-25 09:30:27 +01:00
parent da322487f1
commit 3c7d94609c
1 changed files with 17 additions and 13 deletions

View File

@ -9,19 +9,12 @@ if (!this.initialized) {
this.throwerParticleEngine = this.entityLoaded.throwerParticleEngine;
this.beforeRender = this.entityLoaded.beforeRender;
this.mouseMove = this.entityLoaded.mouseMove;
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;
if (GameLib.Utils.UndefinedOrNull(this.subscription)) {
if (this.subscription) {
this.subscription.remove();
this.subscription = null;
}
this.subscription = GameLib.Event.Subscribe(
GameLib.Event.AUDIO_ENDED,
function(data) {
@ -34,8 +27,19 @@ if (GameLib.Utils.UndefinedOrNull(this.subscription)) {
}
}.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.PLAY_AUDIO,
{