diff --git a/qemp4een6t.js b/qemp4een6t.js index 73290be..3a001f9 100644 --- a/qemp4een6t.js +++ b/qemp4een6t.js @@ -88,6 +88,9 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { this.kanisterLeakTime = 0.1; this.kanisterSpawnScore = 500; + this.enemiesBurned = 0; + this.enemiesExploded = 0; + this.setNextKanisterSpawnScore = function () { if (this.score > 500) { @@ -182,7 +185,7 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { this.prevLevel = this.level; - this.level = Math.floor(this.enemiesSpawned / 10) + 1; + this.level = Math.floor(this.enemiesExploded / 10) + 1; //this.enemySpawnInterval = Math.pow(this.level, 2) - 3 * this.level + 2; @@ -478,7 +481,7 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { }; this.explode = function (mesh) { - + mesh.enemy.exploding = true; if (mesh.enemy.isKanister) { @@ -495,6 +498,8 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { console.log('exploding enemy'); + this.enemiesExploded += 1; + GameLib.Event.Emit( GameLib.Event.GAME_DATA, { @@ -525,6 +530,8 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) { console.log('burning enemy ' + mesh.name); + this.enemiesBurned += 1; + mesh.enemy.burning = true; GameLib.Event.Emit(