Update: CC - Before Render - Moorcow (to6trvr3fj.js) 746 bytes modified

beta.r3js.org
-=yb4f310 2017-11-16 09:57:15 +01:00
parent 7c8c9a9f28
commit b557a8f1e9
1 changed files with 39 additions and 1 deletions

View File

@ -181,12 +181,50 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
console.log('exploding enemy');
enemy.exploding = true;
var sound = GameLib.Utils.GetRandomIntInclusive(1,3);
var name = 'Audio - Blast 1';
if (sound === 2) {
name = 'Audio - Blast 2';
}
if (sound === 3) {
name = 'Audio - Blast 3';
}
this.blastSubscription = GameLib.Event.Subscribe(
GameLib.Event.AUDIO_ENDED,
function(data) {
if (this.blastSubscription) {
this.blastSubscription.remove();
this.blastSubscription = null;
if (data.name === name) {
GameLib.Event.Emit(
GameLib.Event.PLAY_AUDIO,
{
name : 'Audio - Ho ho ho'
}
);
}
}
}.bind(this)
);
GameLib.Event.Emit(
GameLib.Event.PLAY_AUDIO,
{
name : 'Audio - Ho ho ho'
name : name
}
);
// var particleEngine = this.smokeParticleEngine.clone();
// particleEngine.position = mesh.position.clone();
// particleEngine.updateInstance('position');