if (this.parentEntity === data.entity) { console.log('my entity loaded :)'); } else { return; } this.enemies = []; /** * Min and max spawn time is in seconds */ R3.D3.CustomCode.MIN_SPAWN_TIME = 1; R3.D3.CustomCode.MAX_SPAWN_TIME = 4; /** * Tell all our custom code components that we loaded */ this.beforeRender = R3.EntityManager.Instance.findComponentById('4jubz9thqn'); this.beforeRender.entityLoaded = this; this.mouseUp = R3.EntityManager.Instance.findComponentById('c7jkwjdjbk'); this.mouseUp.entityLoaded = this; this.mouseDown = R3.EntityManager.Instance.findComponentById('j1gg46ln21'); this.mouseDown.entityLoaded = this; this.mouseMove = R3.EntityManager.Instance.findComponentById('4rv4pr9m9q'); this.mouseMove.entityLoaded = this; /** * Create references to all our 'in game' objects */ this.bull = R3.EntityManager.Instance.findComponentById('g53xep7woq'); this.star = R3.EntityManager.Instance.findComponentById('yc8489392s'); this.burger = R3.EntityManager.Instance.findComponentById('d3lipkl5e6'); this.parcel = R3.EntityManager.Instance.findComponentById('uchnodlss4'); this.camera = R3.EntityManager.Instance.findComponentById('0ph5bo9dyi'); this.scene = R3.EntityManager.Instance.findComponentById('tcoetu9g5k'); this.cursor = R3.EntityManager.Instance.findComponentById('ah7gtz3mou'); this.thrower = R3.EntityManager.Instance.findComponentById('69a7qg3rkb'); R3.Event.Emit( R3.Event.GET_GRAPHICS_IMPLEMENTATION, null, function(graphics) { this.graphics = graphics }.bind(this) ); this.mouse = new R3.Mouse(this.graphics); this.raycaster = new R3.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; /** * Plant all our trees */ var treeSmall = R3.EntityManager.Instance.findComponentById('dpd0qnvrrp'); var treeMedium = R3.EntityManager.Instance.findComponentById('n9tklzic0s'); var treeLarge = R3.EntityManager.Instance.findComponentById('ib2wuwzild'); var stone1 = R3.EntityManager.Instance.findComponentById('ig7vhdkoad'); var stone2 = R3.EntityManager.Instance.findComponentById('bvkorlbttn'); var materialTreesAndRocks = R3.EntityManager.Instance.findComponentById('85ek16brbf'); var mesh = null; var material = null; /** * No Clones for Olcayto */ //@ sourceURL=entityLoaded.js