game-start events

beta.r3js.org
-=ybafelo 2018-05-24 14:16:53 +02:00
parent 1ed96d9134
commit 1f0362ba62
1 changed files with 17 additions and 7 deletions

View File

@ -394,15 +394,25 @@ R3.CustomCode.prototype.move = function(data) {
this.footballPlayer.instance.translateY(this.playerY);
this.football.instance.position.y = this.ballY;
this.mouseMove.entityLoaded = this;
this.touchMove.entityLoaded = this;
this.beforeRender.entityLoaded = this;
R3.Event.Emit(
R3.Event.PLAY_AUDIO,
{
name : 'Audio - Crowd'
R3.Event.Subscribe(
R3.Event.GAME_START,
function() {
R3.Event.Emit(
R3.Event.PLAY_AUDIO,
{
name : 'Audio - Crowd'
}
);
this.mouseMove.entityLoaded = this;
this.touchMove.entityLoaded = this;
this.beforeRender.entityLoaded = this;
}
);
R3.Event.Emit(R3.Event.GAME_LOADED);
//@ sourceURL=entityLoaded.js