diff --git a/nuqb3rb3y5.js b/nuqb3rb3y5.js index e7ac6a2..71fb242 100644 --- a/nuqb3rb3y5.js +++ b/nuqb3rb3y5.js @@ -82,9 +82,11 @@ GameLib.Event.Subscribe( * Tell all our custom code components that we loaded */ GameLib.Event.Subscribe( - GameLib.Event.GAME_START, + GameLib.Event.CUSTOM_GAME_START, function() { + delete this.beforeRender.initialized; + this.beforeRender.entityLoaded = this; this.mouseUp.entityLoaded = this; this.mouseDown.entityLoaded = this; @@ -110,33 +112,6 @@ GameLib.Event.Subscribe( }.bind(this) ); -GameLib.Event.Subscribe( - GameLib.Event.GAME_RESTART, - function() { - console.log('restarting game'); - GameLib.Event.Emit(GameLib.Event.GAME_OVER); - delete this.beforeRender.initialized; - GameLib.Event.Emit(GameLib.Event.GAME_START); - }.bind(this) -); - -GameLib.Event.Subscribe( - GameLib.Event.GAME_OVER, - function() { - - this.beforeRender.entityLoaded = null; - this.mouseUp.entityLoaded = null; - this.mouseDown.entityLoaded = null; - this.mouseMove.entityLoaded = null; - this.touchMove.entityLoaded = null; - - GameLib.Event.Emit(GameLib.Event.STOP_ALL_AUDIO); - }.bind(this) -); - -//GameLib.Event.Emit(GameLib.Event.MOUSE_UP); - - /** * Plant all our trees - Below code gets generated automatically */