Update: CC - SnailRunner - Entity Loaded (78gnds8jrj.js) 146 bytes modified
parent
1d3381a3df
commit
ec7827892b
|
@ -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
|
Loading…
Reference in New Issue