Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 227 bytes modified

beta.r3js.org
-=yb4f310 2018-04-03 13:27:36 +02:00
parent dbd977ad92
commit 23121376d9
1 changed files with 17 additions and 1 deletions

View File

@ -1895,6 +1895,14 @@ GameLib.Event.Subscribe(
this.explodeTime = 0;
this.speedTimer = 0;
GameLib.Event.Emit(
GameLib.Event.GAME_DATA,
{
type : 'game_start',
state : this.state
}
);
/**
* Re-initialize our other custom code components
*/
@ -1942,7 +1950,15 @@ GameLib.Event.Subscribe(
this.touchStart.initialized = false;
this.touchStart.entityLoaded = null;
console.log('starting game snake');
GameLib.Event.Emit(
GameLib.Event.GAME_DATA,
{
type : 'game_over',
state : this.state
}
);
console.log('game over');
}.bind(this)
)