Update: CC - Before Render - Moorcow (a2ow5l92js.js) 74 bytes modified
parent
7868624d37
commit
3f9b507eed
|
@ -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,
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue