r3-custom-code/ahm5t3rg19.js

32 lines
806 B
JavaScript
Raw Normal View History

if (!this.entityLoaded) {
return;
}
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;
this.throwerParticleEngine.updateInstance('particlesPerSecond');
this.throwerParticleEngine.templateParticle.speed = 300;
this.throwerParticleEngine.templateParticle.scale.x = 15;
GameLib.Event.Emit(
GameLib.Event.PLAY_AUDIO,
{
name : 'Audio - Flamethrower'
}
);
return null;
//@ sourceURL=mouseDown.js