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

beta.r3js.org
-=yb4f310 2018-03-13 12:53:19 +01:00
parent 3dd4d321ea
commit 98c03d8e35
1 changed files with 11 additions and 4 deletions

View File

@ -26,7 +26,8 @@ this.runtime = GameLib.Utils.GetRuntime();
/** /**
* Custom Code Components * Custom Code Components
*/ */
this.beforeRender = GameLib.EntityManager.Instance.findComponentById('zjq6ach3jt'); this.beforeRender = GameLib.EntityManager.Instance.findComponentById('zjq6ach3jt');
this.keyUp = GameLib.EntityManager.Instance.findComponentById('306204wy29');
/** /**
* Geometries * Geometries
@ -279,8 +280,11 @@ GameLib.Event.Subscribe(
/** /**
* Re-initialize our other custom code components * Re-initialize our other custom code components
*/ */
this.beforeRender.initialized = false; this.beforeRender.initialized = false;
this.beforeRender.entityLoaded = this; this.beforeRender.entityLoaded = this;
this.keyUp.initialized = false;
this.keyUp.entityLoaded = this;
console.log('starting game snake'); console.log('starting game snake');
}.bind(this) }.bind(this)
@ -290,8 +294,11 @@ GameLib.Event.Subscribe(
GameLib.Event.GAME_OVER, GameLib.Event.GAME_OVER,
function() { function() {
this.beforeRender.entityLoaded = null; this.keyUp.initialized = false;
this.keyUp.entityLoaded = null;
this.beforeRender.initialized = false; this.beforeRender.initialized = false;
this.beforeRender.entityLoaded = null;
console.log('starting game snake'); console.log('starting game snake');
}.bind(this) }.bind(this)