Update: CC - Entity Loaded - Moorcow (xtihcyhagp.js) 423 bytes modified
parent
43cbe64d72
commit
12785b484a
|
@ -107,6 +107,22 @@ GameLib.Event.Subscribe(
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
GameLib.Event.Subscribe(
|
||||||
|
GameLib.Event.GAME_RESTART,
|
||||||
|
function() {
|
||||||
|
console.log('restarting game');
|
||||||
|
|
||||||
|
this.beforeRender.entityLoaded = null;
|
||||||
|
this.mouseUp.entityLoaded = null;
|
||||||
|
this.mouseDown.entityLoaded = null;
|
||||||
|
this.mouseMove.entityLoaded = null;
|
||||||
|
|
||||||
|
this.beforeRender.initialized = false;
|
||||||
|
GameLib.Event.Emit(GameLib.Event.STOP_ALL_AUDIO);
|
||||||
|
GameLib.Event.Emit(GameLib.Event.GAME_START);
|
||||||
|
}.bind(this)
|
||||||
|
);
|
||||||
|
|
||||||
GameLib.Event.Subscribe(
|
GameLib.Event.Subscribe(
|
||||||
GameLib.Event.GAME_OVER,
|
GameLib.Event.GAME_OVER,
|
||||||
function() {
|
function() {
|
||||||
|
|
Loading…
Reference in New Issue