Update: CC - Before Render - Moorcow (zo950m57cc.js) 53 bytes modified

beta.r3js.org
-=yb4f310 2017-11-26 23:49:02 +01:00
parent e5222924a4
commit 86615e493b
1 changed files with 11 additions and 11 deletions

View File

@ -240,18 +240,18 @@
var enemyType = GameLib.Utils.GetRandomIntInclusive(1, 5); var enemyType = GameLib.Utils.GetRandomIntInclusive(1, 5);
var meshType = GameLib.Utils.GetRandomIntInclusive(1, 5); var meshType = GameLib.Utils.GetRandomIntInclusive(1, 5);
if (kanister) { if (kanister) {
meshType = 6; meshType = 6;
} else { }
var mesh = this.getNextMesh(meshType); var mesh = this.getNextMesh(meshType);
if (!mesh) {
console.warn('re-attempt to spawn');
return this.spawnEnemy(false);
}
if (!mesh) {
return;
}
if (!kanister) {
this.enemiesSpawned++; this.enemiesSpawned++;
this.setLevelProperties(); this.setLevelProperties();
} }
@ -783,7 +783,7 @@
if (material.name.indexOf('Trees') === -1) { if (material.name.indexOf('Trees') === -1) {
mesh.burnLife -= data.delta * 2; mesh.burnLife -= data.delta;
if (mesh.burnLife < 0) { if (mesh.burnLife < 0) {
mesh.burnLife = 0; mesh.burnLife = 0;
this.burn(mesh); this.burn(mesh);
@ -796,7 +796,7 @@
); );
if (mesh.burnLife <= 0) { if (mesh.burnLife <= 0) {
mesh.explodeLife -= data.delta * 2; mesh.explodeLife -= data.delta;
if (mesh.explodeLife < 0) { if (mesh.explodeLife < 0) {
mesh.explodeLife = 0; mesh.explodeLife = 0;
} }
@ -882,7 +882,7 @@
if (this.enemySpawnTime > this.enemySpawnInterval && this.running) { if (this.enemySpawnTime > this.enemySpawnInterval && this.running) {
this.enemySpawnTime = 0; this.enemySpawnTime = 0;
this.spawnEnemy(); this.spawnEnemy(false);
} }
this.enemies = this.enemies.reduce( this.enemies = this.enemies.reduce(