diff --git a/rciyhwg65b.js b/rciyhwg65b.js index 0299d25..ecf4cc8 100644 --- a/rciyhwg65b.js +++ b/rciyhwg65b.js @@ -2,7 +2,18 @@ if (!this.entityLoaded) { return; } -this.beforeRender.mouseDown = true; +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; this.throwerParticleEngine.enabled = true; this.throwerParticleEngine.particlesPerSecond = 50;