Update: CC - Before Render - Moorcow (a2ow5l92js.js) 74 bytes modified

beta.r3js.org
-=yb4f310 2017-11-25 10:11:37 +01:00
parent 7868624d37
commit 3f9b507eed
1 changed files with 21 additions and 28 deletions

View File

@ -15,6 +15,27 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
}
);
if (this.blastSubscription) {
this.blastSubscription.remove();
}
this.blastSubscription = GameLib.Event.Subscribe(
GameLib.Event.AUDIO_ENDED,
function(data) {
if (data.audio.name === name) {
var play = GameLib.Utils.GetRandomIntInclusive(1,5);
if (play === 1) {
GameLib.Event.Emit(
GameLib.Event.PLAY_AUDIO,
{
name : 'Audio - Ho ho ho'
}
);
}
}
}.bind(this)
);
this.fog = this.entityLoaded.fog;
this.bull = this.entityLoaded.bull;
this.star = this.entityLoaded.star;
@ -397,34 +418,6 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
name = 'Audio - Blast 3';
}
this.blastSubscription = GameLib.Event.Subscribe(
GameLib.Event.AUDIO_ENDED,
function(data) {
if (data.audio.name === name) {
if (this.blastSubscription) {
this.blastSubscription.remove();
this.blastSubscription = null;
var play = GameLib.Utils.GetRandomIntInclusive(1,3);
if (play === 1) {
GameLib.Event.Emit(
GameLib.Event.PLAY_AUDIO,
{
name : 'Audio - Ho ho ho'
}
);
}
}
}
}.bind(this)
);
GameLib.Event.Emit(
GameLib.Event.PLAY_AUDIO,
{