diff --git a/hv7vehw7se.js b/hv7vehw7se.js index 9efcac7..7ec48c1 100644 --- a/hv7vehw7se.js +++ b/hv7vehw7se.js @@ -1,22 +1,21 @@ - if (this.parentEntity === data.entity) { - console.log('my entity loaded :)'); + console.log('my entity loaded :)'); } else { - return; + return; } this.enemies = []; /** - * Min and max spawn time is in seconds - */ + * Min and max spawn time is in seconds + */ GameLib.CustomCode.MIN_SPAWN_TIME = 1; GameLib.CustomCode.MAX_SPAWN_TIME = 4; GameLib.CustomCode.OBJECT_BUFFER_SIZE = 5; /** - * Create references to all our 'in game' objects - */ + * Create references to all our 'in game' objects + */ this.fog = GameLib.EntityManager.Instance.findComponentById('zq8861jzb4') this.bull = GameLib.EntityManager.Instance.findComponentById('cpcuzjjx27'); this.star = GameLib.EntityManager.Instance.findComponentById('lc7boe8lul'); @@ -54,11 +53,11 @@ this.materialTreesAndRocks = GameLib.EntityManager.Instance.findComponentById('g this.burningTreeParticleEngine = GameLib.EntityManager.Instance.findComponentById('jdn84unl9b'); GameLib.Event.Emit( - GameLib.Event.GET_RUNTIME, - null, - function(runtime) { - this.graphics = runtime.graphics - }.bind(this) + GameLib.Event.GET_RUNTIME, + null, + function(runtime) { + this.graphics = runtime.graphics + }.bind(this) ); this.mouse = new GameLib.Mouse(this.graphics); @@ -74,33 +73,33 @@ this.touchMove = GameLib.EntityManager.Instance.findComponentById('evwkow5289') * Tell all our custom code components that we loaded */ GameLib.Event.Subscribe( - GameLib.Event.CUSTOM_GAME_START, - function() { + GameLib.Event.CUSTOM_GAME_START, + function() { - delete this.beforeRender.initialized; + delete this.beforeRender.initialized; - this.beforeRender.entityLoaded = this; - this.mouseUp.entityLoaded = this; - this.mouseDown.entityLoaded = this; - this.mouseMove.entityLoaded = this; - this.touchMove.entityLoaded = this; + this.beforeRender.entityLoaded = this; + this.mouseUp.entityLoaded = this; + this.mouseDown.entityLoaded = this; + this.mouseMove.entityLoaded = this; + this.touchMove.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}); - this.camera.lookAt.x = 0; - this.camera.lookAt.y = 0; - this.camera.lookAt.z = 0; - this.camera.updateInstance('lookAt'); + this.camera.lookAt.x = 0; + this.camera.lookAt.y = 0; + this.camera.lookAt.z = 0; + this.camera.updateInstance('lookAt'); - this.mouse.x = 0; - this.mouse.y = 0; + this.mouse.x = 0; + this.mouse.y = 0; - }.bind(this) + }.bind(this) ); /** - * Plant all our trees - Below code gets generated automatically - */ + * Plant all our trees - Below code gets generated automatically + */ var treeSmall = this.treeSmall; var treeMedium = this.treeMedium; var treeLarge = this.treeLarge; @@ -119,60 +118,60 @@ this.meshes = {}; this.createMesh = function(meshType) { - mesh = this[meshType].clone(); - material = this[meshType].materials[0].clone(); - mesh.materials = [material]; - mesh.updateInstance('materials'); + mesh = this[meshType].clone(); + material = this[meshType].materials[0].clone(); + mesh.materials = [material]; + mesh.updateInstance('materials'); - explodeParticleEngine = this.explodeParticleEngine.clone(); - explodeParticleEngine.position = mesh.position.clone(); - explodeParticleEngine.updateInstance('position'); - mesh.explodeParticleEngine = explodeParticleEngine; + explodeParticleEngine = this.explodeParticleEngine.clone(); + explodeParticleEngine.position = mesh.position.clone(); + explodeParticleEngine.updateInstance('position'); + mesh.explodeParticleEngine = explodeParticleEngine; - smokeParticleEngine = this.smokeParticleEngine.clone(); - smokeParticleEngine.position = mesh.position.clone(); - smokeParticleEngine.updateInstance('position'); - mesh.smokeParticleEngine = smokeParticleEngine; + smokeParticleEngine = this.smokeParticleEngine.clone(); + smokeParticleEngine.position = mesh.position.clone(); + smokeParticleEngine.updateInstance('position'); + mesh.smokeParticleEngine = smokeParticleEngine; - fireParticleEngine = this.fireParticleEngine.clone(); - fireParticleEngine.position = mesh.position.clone(); - fireParticleEngine.updateInstance('position'); - mesh.fireParticleEngine = fireParticleEngine; + fireParticleEngine = this.fireParticleEngine.clone(); + fireParticleEngine.position = mesh.position.clone(); + fireParticleEngine.updateInstance('position'); + mesh.fireParticleEngine = fireParticleEngine; - if (typeof this.meshes[meshType] === 'undefined') { - this.meshes[meshType] = []; - } + if (typeof this.meshes[meshType] === 'undefined') { + this.meshes[meshType] = []; + } - this.meshes[meshType].push( - { - inUse : false, - mesh : mesh - } - ); + this.meshes[meshType].push( + { + inUse : false, + mesh : mesh + } + ); }; for (var n = 0; n < GameLib.CustomCode.OBJECT_BUFFER_SIZE; n++) { - this.createMesh('bull'); + this.createMesh('bull'); } for (var n = 0; n < GameLib.CustomCode.OBJECT_BUFFER_SIZE; n++) { - this.createMesh('star'); + this.createMesh('star'); } for (var n = 0; n < GameLib.CustomCode.OBJECT_BUFFER_SIZE; n++) { - this.createMesh('burger'); + this.createMesh('burger'); } for (var n = 0; n < GameLib.CustomCode.OBJECT_BUFFER_SIZE; n++) { - this.createMesh('parcel'); + this.createMesh('parcel'); } for (var n = 0; n < GameLib.CustomCode.OBJECT_BUFFER_SIZE; n++) { - this.createMesh('santa'); + this.createMesh('santa'); } for (var n = 0; n < GameLib.CustomCode.OBJECT_BUFFER_SIZE; n++) { - this.createMesh('kanister'); + this.createMesh('kanister'); } mesh = stone2.clone(); @@ -193,7 +192,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -215,7 +214,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -237,7 +236,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -259,7 +258,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -281,7 +280,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -303,7 +302,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -325,7 +324,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -347,7 +346,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -369,7 +368,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -391,7 +390,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -413,7 +412,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -435,7 +434,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -457,7 +456,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -479,7 +478,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -501,7 +500,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -523,7 +522,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -545,7 +544,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -567,7 +566,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -589,7 +588,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -611,7 +610,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -633,7 +632,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -655,7 +654,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -677,7 +676,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -699,7 +698,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -721,7 +720,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -743,7 +742,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -765,7 +764,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -787,7 +786,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -809,7 +808,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -831,7 +830,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -853,7 +852,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -875,7 +874,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -897,7 +896,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -919,7 +918,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -941,7 +940,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -963,7 +962,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -985,7 +984,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1007,7 +1006,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1029,7 +1028,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1051,7 +1050,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1073,7 +1072,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1095,7 +1094,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1117,7 +1116,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1139,7 +1138,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1161,7 +1160,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1183,7 +1182,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1205,7 +1204,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1227,7 +1226,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1249,7 +1248,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1271,7 +1270,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1293,7 +1292,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1315,7 +1314,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1337,7 +1336,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1359,7 +1358,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1381,7 +1380,7 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; @@ -1403,29 +1402,28 @@ mesh.updateInstance('rotation'); mesh.updateInstance('scale'); burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); mesh.burningTreeParticleEngine = burningTreeParticleEngine; burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); this.treeSmall.burningTreeParticleEngine = burningTreeParticleEngine; burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); this.treeMedium.burningTreeParticleEngine = burningTreeParticleEngine; burningTreeParticleEngine = this.burningTreeParticleEngine.clone(); burningTreeParticleEngine.position = mesh.position.clone(); -burningTreeParticleEngine.position.y += mesh.dimensions.y + 5; +burningTreeParticleEngine.position.y += mesh.geometry.boundingBox.max.y + 5; burningTreeParticleEngine.updateInstance('position'); this.treeLarge.burningTreeParticleEngine = burningTreeParticleEngine; GameLib.Event.Emit(GameLib.Event.GAME_LOADED); -//@ sourceURL=entityLoaded.js - +//@ sourceURL=entityLoaded.js \ No newline at end of file