From 5820e305d62bb8702768476ee36fc13b96f2bac1 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Sun, 19 Nov 2017 20:07:31 +0100 Subject: [PATCH] Update: CC - Entity Loaded - Moorcow (xtihcyhagp.js) 9 bytes modified --- xtihcyhagp.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/xtihcyhagp.js b/xtihcyhagp.js index cc39239..9476b3b 100644 --- a/xtihcyhagp.js +++ b/xtihcyhagp.js @@ -63,6 +63,7 @@ this.beforeRender = GameLib.EntityManager.Instance.findComponentById('autqzs1rvq this.mouseUp = GameLib.EntityManager.Instance.findComponentById('monq9ryw7a'); this.mouseDown = GameLib.EntityManager.Instance.findComponentById('d5o2axpc0m'); this.mouseMove = GameLib.EntityManager.Instance.findComponentById('6st4io7ceu'); +this.touchMove = GameLib.EntityManager.Instance.findComponentById('c55930et90'); GameLib.Event.Subscribe( GameLib.Event.WINDOW_RESIZE, @@ -88,6 +89,7 @@ GameLib.Event.Subscribe( this.mouseUp.entityLoaded = this; this.mouseDown.entityLoaded = this; this.mouseMove.entityLoaded = this; + this.touchMove.entityLoaded = this; GameLib.Event.Emit(GameLib.Event.WINDOW_RESIZE, {width : window.innerWidth, height:window.innerHeight}); @@ -111,16 +113,9 @@ GameLib.Event.Subscribe( 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; - + console.log('restarting game'); + GameLib.Event.Emit(GameLib.Event.GAME_OVER); delete this.beforeRender.initialized; - - GameLib.Event.Emit(GameLib.Event.STOP_ALL_AUDIO); GameLib.Event.Emit(GameLib.Event.GAME_START); }.bind(this) ); @@ -133,6 +128,7 @@ GameLib.Event.Subscribe( 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)