Update: CC - Snake FS - Entity Loaded (21g30t1e75.js) 405 bytes modified
parent
e0d360adf4
commit
d9ca25c773
|
@ -6,6 +6,11 @@ if (this.parentEntity === data.entity) {
|
||||||
|
|
||||||
this.runtime = GameLib.Utils.GetRuntime();
|
this.runtime = GameLib.Utils.GetRuntime();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom Code Components
|
||||||
|
*/
|
||||||
|
this.beforeRender = GameLib.EntityManager.Instance.findComponentById('zjq6ach3jt');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Geometries
|
* Geometries
|
||||||
*/
|
*/
|
||||||
|
@ -86,7 +91,19 @@ GameLib.Event.Subscribe(
|
||||||
|
|
||||||
this.snake = [];
|
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');
|
console.log('starting game snake');
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
|
|
Loading…
Reference in New Issue