Update: CC - Entity Loaded - Moorcow (xtihcyhagp.js) 328 bytes modified
parent
cd14d2dd16
commit
8e38018563
|
@ -57,22 +57,21 @@ GameLib.Event.Emit(
|
||||||
this.mouse = new GameLib.Mouse(this.graphics);
|
this.mouse = new GameLib.Mouse(this.graphics);
|
||||||
this.raycaster = new GameLib.D3.Raycaster(this.graphics);
|
this.raycaster = new GameLib.D3.Raycaster(this.graphics);
|
||||||
|
|
||||||
|
this.beforeRender = GameLib.EntityManager.Instance.findComponentById('autqzs1rvq');
|
||||||
|
this.mouseUp = GameLib.EntityManager.Instance.findComponentById('monq9ryw7a');
|
||||||
|
this.mouseDown = GameLib.EntityManager.Instance.findComponentById('d5o2axpc0m');
|
||||||
|
this.mouseMove = GameLib.EntityManager.Instance.findComponentById('6st4io7ceu');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tell all our custom code components that we loaded
|
* Tell all our custom code components that we loaded
|
||||||
*/
|
*/
|
||||||
GameLib.Event.Subscribe(
|
GameLib.Event.Subscribe(
|
||||||
GameLib.Event.GAME_START,
|
GameLib.Event.GAME_START,
|
||||||
function() {
|
function() {
|
||||||
this.beforeRender = GameLib.EntityManager.Instance.findComponentById('autqzs1rvq');
|
|
||||||
this.beforeRender.entityLoaded = this;
|
this.beforeRender.entityLoaded = this;
|
||||||
|
|
||||||
this.mouseUp = GameLib.EntityManager.Instance.findComponentById('monq9ryw7a');
|
|
||||||
this.mouseUp.entityLoaded = this;
|
this.mouseUp.entityLoaded = this;
|
||||||
|
|
||||||
this.mouseDown = GameLib.EntityManager.Instance.findComponentById('d5o2axpc0m');
|
|
||||||
this.mouseDown.entityLoaded = this;
|
this.mouseDown.entityLoaded = this;
|
||||||
|
|
||||||
this.mouseMove = GameLib.EntityManager.Instance.findComponentById('6st4io7ceu');
|
|
||||||
this.mouseMove.entityLoaded = this;
|
this.mouseMove.entityLoaded = this;
|
||||||
|
|
||||||
GameLib.Event.Emit(GameLib.Event.WINDOW_RESIZE, {width : window.innerWidth, height:window.innerHeight});
|
GameLib.Event.Emit(GameLib.Event.WINDOW_RESIZE, {width : window.innerWidth, height:window.innerHeight});
|
||||||
|
@ -86,6 +85,24 @@ GameLib.Event.Subscribe(
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
GameLib.Event.Subscribe(
|
||||||
|
GameLib.Event.GAME_OVER,
|
||||||
|
function() {
|
||||||
|
|
||||||
|
this.beforeRender.entityLoaded = null;
|
||||||
|
this.mouseUp.entityLoaded = null;
|
||||||
|
this.mouseDown.entityLoaded = null;
|
||||||
|
this.mouseMove.entityLoaded = null;
|
||||||
|
|
||||||
|
GameLib.Event.Emit(
|
||||||
|
GameLib.Event.STOP_AUDIO,
|
||||||
|
{
|
||||||
|
name : 'Audio - Xmas'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}.bind(this)
|
||||||
|
);
|
||||||
|
|
||||||
//GameLib.Event.Emit(GameLib.Event.MOUSE_UP);
|
//GameLib.Event.Emit(GameLib.Event.MOUSE_UP);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue