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

beta.r3js.org
-=yb4f310 2018-03-12 14:28:27 +01:00
parent e0d360adf4
commit d9ca25c773
1 changed files with 17 additions and 0 deletions

View File

@ -6,6 +6,11 @@ if (this.parentEntity === data.entity) {
this.runtime = GameLib.Utils.GetRuntime();
/**
* Custom Code Components
*/
this.beforeRender = GameLib.EntityManager.Instance.findComponentById('zjq6ach3jt');
/**
* Geometries
*/
@ -86,7 +91,19 @@ GameLib.Event.Subscribe(
this.snake = [];
this.beforeRender.initialized = false;
this.beforeRender.entityLoaded = this;
console.log('starting game snake');
}.bind(this)
);
GameLib.Event.Subscribe(
GameLib.Event.GAME_OVER,
function() {
this.beforeRender.entityLoaded = null;
this.beforeRender.initialized = false;
console.log('starting game snake');
}.bind(this)