diff --git a/72d6a2a3kc.js b/72d6a2a3kc.js index e6a9299..bedf757 100644 --- a/72d6a2a3kc.js +++ b/72d6a2a3kc.js @@ -142,7 +142,6 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { velocity = {x:0,y:0,z:speed}; } - enemy.mesh.position.x = position.x; enemy.mesh.position.y = position.y; enemy.mesh.position.z = position.z; @@ -214,17 +213,7 @@ if (this.mouseIsDown) { mesh.name.indexOf('Stone') === -1 //stones ) { - if (mesh.instance.material instanceof Array) { - mesh.instance.material.map( - function(material) { - material.color.sub(this.toBlack); - if (material.color.r <= 0) { - material.emissive.add(this.toRed); - material.emissive.add(this.toRed); - } - } - ); - } else { + if (mesh.materials[0].name.indexOf('Trees') === -1) { mesh.instance.material.color.sub(this.toBlack); if (mesh.instance.material.color.r <= 0) { if (mesh.instance.material.emissive) { @@ -233,7 +222,6 @@ if (this.mouseIsDown) { } } } - } }.bind(this) );