Update: CC - Before Render - Moorcow (qemp4een6t.js) 121 bytes modified

beta.r3js.org
-=yb4f310 2017-11-28 08:52:27 +01:00
parent 2205a9734e
commit e3e727ec1f
1 changed files with 9 additions and 2 deletions

View File

@ -88,6 +88,9 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
this.kanisterLeakTime = 0.1; this.kanisterLeakTime = 0.1;
this.kanisterSpawnScore = 500; this.kanisterSpawnScore = 500;
this.enemiesBurned = 0;
this.enemiesExploded = 0;
this.setNextKanisterSpawnScore = function () { this.setNextKanisterSpawnScore = function () {
if (this.score > 500) { if (this.score > 500) {
@ -182,7 +185,7 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
this.prevLevel = this.level; 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; //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) { this.explode = function (mesh) {
mesh.enemy.exploding = true; mesh.enemy.exploding = true;
if (mesh.enemy.isKanister) { if (mesh.enemy.isKanister) {
@ -495,6 +498,8 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
console.log('exploding enemy'); console.log('exploding enemy');
this.enemiesExploded += 1;
GameLib.Event.Emit( GameLib.Event.Emit(
GameLib.Event.GAME_DATA, GameLib.Event.GAME_DATA,
{ {
@ -525,6 +530,8 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
console.log('burning enemy ' + mesh.name); console.log('burning enemy ' + mesh.name);
this.enemiesBurned += 1;
mesh.enemy.burning = true; mesh.enemy.burning = true;
GameLib.Event.Emit( GameLib.Event.Emit(