Update: CC - Entity Loaded - Moorcow (m4c2psc19l.js) 468 bytes modified

beta.r3js.org
-=yb4f310 2017-11-14 08:54:47 +01:00
parent 284b41551f
commit 6bc3dadae1
1 changed files with 41 additions and 59 deletions

View File

@ -12,6 +12,40 @@ this.enemies = [];
GameLib.D3.CustomCode.MIN_SPAWN_TIME = 1;
GameLib.D3.CustomCode.MAX_SPAWN_TIME = 4;
/**
* Create references to all our 'in game' objects
*/
this.bull = GameLib.EntityManager.Instance.findComponentById('mkanjiompv');
this.star = GameLib.EntityManager.Instance.findComponentById('5iz2kywf68');
this.burger = GameLib.EntityManager.Instance.findComponentById('g26i649z3j');
this.parcel = GameLib.EntityManager.Instance.findComponentById('s22s8m06q2');
this.santa = GameLib.EntityManager.Instance.findComponentById('byqhlnuto0');
this.camera = GameLib.EntityManager.Instance.findComponentById('2ya9b5if8y');
this.scene = GameLib.EntityManager.Instance.findComponentById('f5d6aj9iiv');
this.cursor = GameLib.EntityManager.Instance.findComponentById('ykfzwmaw9j');
this.thrower = GameLib.EntityManager.Instance.findComponentById('x4rhvbj8cn');
this.renderer = GameLib.EntityManager.Instance.findComponentById('15rh0z60fi');
this.treeSmall = GameLib.EntityManager.Instance.findComponentById('rgw0zarct7');
this.treeMedium = GameLib.EntityManager.Instance.findComponentById('pnsitmldna');
this.treeLarge = GameLib.EntityManager.Instance.findComponentById('hl3ydrafqd');
this.stone1 = GameLib.EntityManager.Instance.findComponentById('qg4l7z9kvt');
this.stone2 = GameLib.EntityManager.Instance.findComponentById('5gxxardq0g');
this.throwerParticleEngine = GameLib.EntityManager.Instance.findComponentById('0k1sgxm2vq');
this.materialTreesAndRocks = GameLib.EntityManager.Instance.findComponentById('9mm3vw8wtb');
GameLib.Event.Emit(
GameLib.Event.GET_GRAPHICS_IMPLEMENTATION,
null,
function(graphics) {
this.graphics = graphics
}.bind(this)
);
this.mouse = new GameLib.Mouse(this.graphics);
this.raycaster = new GameLib.D3.Raycaster(this.graphics);
/**
* Tell all our custom code components that we loaded
*/
@ -27,69 +61,17 @@ this.mouseDown.entityLoaded = this;
this.mouseMove = GameLib.EntityManager.Instance.findComponentById('8a0m30eevi');
this.mouseMove.entityLoaded = this;
/**
* Create references to all our 'in game' objects
*/
this.bull = GameLib.EntityManager.Instance.findComponentById('mkanjiompv');
this.star = GameLib.EntityManager.Instance.findComponentById('5iz2kywf68');
this.burger = GameLib.EntityManager.Instance.findComponentById('g26i649z3j');
this.parcel = GameLib.EntityManager.Instance.findComponentById('s22s8m06q2');
this.santa = GameLib.EntityManager.Instance.findComponentById('byqhlnuto0');
this.camera = GameLib.EntityManager.Instance.findComponentById('2ya9b5if8y');
this.scene = GameLib.EntityManager.Instance.findComponentById('f5d6aj9iiv');
this.cursor = GameLib.EntityManager.Instance.findComponentById('ykfzwmaw9j');
this.thrower = GameLib.EntityManager.Instance.findComponentById('x4rhvbj8cn');
this.renderer = GameLib.EntityManager.Instance.findComponentById('15rh0z60fi');
this.throwerParticleEngine = GameLib.EntityManager.Instance.findComponentById('0k1sgxm2vq');
GameLib.Event.Emit(
GameLib.Event.GET_GRAPHICS_IMPLEMENTATION,
null,
function(graphics) {
this.graphics = graphics
}.bind(this)
);
this.mouse = new GameLib.Mouse(this.graphics);
this.raycaster = new GameLib.D3.Raycaster(this.graphics);
/**
* Link some objects for MouseMove component
*/
this.mouseMove.mouse = this.mouse;
this.mouseMove.raycaster = this.raycaster;
this.mouseMove.camera = this.camera;
this.mouseMove.scene = this.scene;
this.mouseMove.cursor = this.cursor;
this.mouseMove.thrower = this.thrower;
this.mouseMove.throwerParticleEngine = this.throwerParticleEngine;
/**
* Link some objects for MouseDown component
*/
this.mouseDown.throwerParticleEngine = this.throwerParticleEngine;
this.mouseDown.beforeRender = this.beforeRender;
/**
* Link some objects for MouseUp component
*/
this.mouseUp.throwerParticleEngine = this.throwerParticleEngine;
this.mouseUp.beforeRender = this.beforeRender;
this.mouseUp.renderer = this.renderer;
GameLib.Event.Emit(GameLib.Event.MOUSE_UP);
/**
* Plant all our trees
* Plant all our trees - Below code gets generated automatically
*/
var treeSmall = GameLib.EntityManager.Instance.findComponentById('rgw0zarct7');
var treeMedium = GameLib.EntityManager.Instance.findComponentById('pnsitmldna');
var treeLarge = GameLib.EntityManager.Instance.findComponentById('hl3ydrafqd');
var stone1 = GameLib.EntityManager.Instance.findComponentById('qg4l7z9kvt');
var stone2 = GameLib.EntityManager.Instance.findComponentById('5gxxardq0g');
var materialTreesAndRocks = GameLib.EntityManager.Instance.findComponentById('9mm3vw8wtb');
var treeSmall = this.treeSmall;
var treeMedium = this.treeMedium;
var treeLarge = this.treeLarge;
var stone1 = this.stone1;
var stone2 = this.stone2;
var materialTreesAndRocks = this.materialTreesAndRocks;
var mesh = null;
var material = null;