2017-11-13 09:43:43 +01:00
|
|
|
if (!this.entityLoaded) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2017-11-14 08:54:47 +01:00
|
|
|
if (!this.initialized) {
|
|
|
|
/**
|
|
|
|
* Link some objects for MouseDown component
|
|
|
|
*/
|
|
|
|
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;
|
2017-11-14 08:06:22 +01:00
|
|
|
|
2017-11-13 09:43:43 +01:00
|
|
|
this.throwerParticleEngine.enabled = true;
|
2017-11-13 15:06:50 +01:00
|
|
|
this.throwerParticleEngine.particlesPerSecond = 50;
|
|
|
|
this.throwerParticleEngine.updateInstance('particlesPerSecond');
|
2017-11-13 15:39:44 +01:00
|
|
|
this.throwerParticleEngine.templateParticle.speed = 300;
|
2017-11-13 15:06:50 +01:00
|
|
|
this.throwerParticleEngine.templateParticle.scale.x = 15;
|
|
|
|
|
2017-11-13 09:43:43 +01:00
|
|
|
|
|
|
|
return null;
|
|
|
|
//@ sourceURL=mouseDown.js
|