Update: CC - SnailRunner - Entity Loaded (78gnds8jrj.js) 146 bytes modified

beta.r3js.org
-=yb4f310 2018-03-09 15:10:16 +01:00
parent 1d3381a3df
commit ec7827892b
1 changed files with 24 additions and 14 deletions

View File

@ -34,11 +34,6 @@ this.sections = [];
*/
this.camera = GameLib.EntityManager.Instance.findComponentById('hd8dsn7o4c');
/**
* Game Variables
*/
this.snail.position.z = 0;
this.speed = 0;
var cloneLeft = this.treesLeft.clone();
var cloneRoad = this.road.clone();
@ -63,14 +58,29 @@ this.sections.push({
right : cloneRight
})
/**
* Activate our custom code components
*/
this.beforeRender.entityLoaded = this;
this.mouseMove.entityLoaded = this;
this.mouseDown.entityLoaded = this;
this.mouseUp.entityLoaded = this;
this.keyDown.entityLoaded = this;
this.keyUp.entityLoaded = this;
GameLib.Event.Subscribe(
GameLib.Event.GAME_START,
function() {
/**
* Game Variables
*/
this.snail.position.z = 0;
this.speed = 0;
this.speedUp = false;
/**
* Activate our custom code components
*/
this.beforeRender.entityLoaded = this;
this.mouseMove.entityLoaded = this;
this.mouseDown.entityLoaded = this;
this.mouseUp.entityLoaded = this;
this.keyDown.entityLoaded = this;
this.keyUp.entityLoaded = this;
}.bind(this)
);
//@ sourceURL=entityLoaded.js