Update: CC - Before Render - Moorcow (a2ow5l92js.js) 223 bytes modified

beta.r3js.org
-=yb4f310 2017-11-24 16:07:42 +01:00
parent 9e42b648ef
commit fb9156c0e1
1 changed files with 30 additions and 38 deletions

View File

@ -342,9 +342,10 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
enemy.explodingLife = 2;
enemy.meshType = meshType;
enemy.score = score;
enemy.isKanister = false;
if (kanister) {
enemy.isKanister = true;
} else {
GameLib.Event.Emit(
@ -447,6 +448,12 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
enemy.exploding = true;
if (enemy.isKanister) {
this.kanisters += 1;
console.log('exploding kanister');
} else {
console.log('exploding enemy');
this.score += enemy.score;
@ -472,6 +479,7 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
event : 'enemyExploded'
}
);
}
this.explodeMesh(mesh);
}
@ -479,22 +487,6 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
);
};
this.explodeKanister = function(mesh) {
this.kanisters += 1;
//this.kanisterTime = 0;
// this.fuelFinished = false;
this.explodeMesh(mesh);
if (mesh.explodeParticleEngine) {
if (GameLib.Utils.UndefinedOrNull(mesh.waiting)) {
mesh.waiting = true;
} else {
mesh.explodeParticleEngine.remove();
mesh.explodeParticleEngine = null;
delete mesh.waiting;
}
}
};
this.burn = function(mesh) {
this.enemies.map(
@ -709,7 +701,7 @@ if (this.mouseIsDown)
var mesh = intersect.mesh;
if (mesh.name.indexOf('Kanister') !== -1) {
this.explodeKanister(mesh);
this.explode(mesh);
return;
}