diff --git a/autqzs1rvq.js b/autqzs1rvq.js index 922106c..7427c6c 100644 --- a/autqzs1rvq.js +++ b/autqzs1rvq.js @@ -47,7 +47,7 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { this.fuelFinished = false; this.level = 1; - this.spawnInterval = 5; + this.spawnInterval = 50; this.score = 0; this.lives = 10; @@ -152,31 +152,36 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { mesh : mesh }; + var distance = 50; + var angledistance = distance * Math.sin(Math.PI / 4); + + var life = distance / 10 / speed; + if (enemyType === 1) { - position.x = -100; + position.x = -distance; velocity = {x:speed,y:0,z:0}; } if (enemyType === 2) { - position.x = 100; + position.x = distance; velocity = {x:-speed,y:0,z:0}; } if (enemyType === 3) { - position.x = -100; - position.z = -100; + position.x = -angledistance; + position.z = -angledistance; velocity = {x:speed,y:0,z:speed}; } if (enemyType === 4) { - position.x = 100; - position.z = -100; + position.x = angledistance; + position.z = -angledistance; velocity = {x:-speed,y:0,z:speed}; } if (enemyType === 5) { position.x = 0; - position.z = -100; + position.z = -distance; velocity = {x:0,y:0,z:speed}; } @@ -196,7 +201,7 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { enemy.rotation = rotation; enemy.lifeTime = 0; - enemy.life = 10; + enemy.life = life; enemy.exploding = false; enemy.burning = false; @@ -633,6 +638,8 @@ this.enemies = this.enemies.reduce( enemy.lifeTime += data.delta; + console.log(enemy.lifeTime); + if (enemy.lifeTime > enemy.life) { if (!enemy.burning && !enemy.exploding) {