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

beta.r3js.org
-=yb4f310 2017-11-27 15:04:10 +01:00
parent fac5c4291d
commit 32cd2883f9
1 changed files with 22 additions and 25 deletions

View File

@ -1,5 +1,3 @@
if (!this.entityLoaded) {
return;
}
@ -492,36 +490,18 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
if (mesh.enemy.isKanister) {
console.log('exploding kanister');
this.kanisters += 1;
if (this.kanisters > 9) {
this.kanisters = 9;
}
console.log('exploding kanister, total count: ' + this.kanisters);
} else {
console.log('exploding enemy');
this.score += mesh.enemy.score;
this.drawScore(mesh.enemy);
console.log('score : ' + this.score);
GameLib.Event.Emit(
GameLib.Event.GAME_DATA,
{
event: 'scoreUpdate',
score: this.score
}
);
if (this.score > this.kanisterSpawnScore) {
this.spawnEnemy(true);
}
GameLib.Event.Emit(
GameLib.Event.GAME_DATA,
{
@ -531,6 +511,24 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
);
}
this.score += mesh.enemy.score;
this.drawScore(mesh.enemy);
console.log('score : ' + this.score);
GameLib.Event.Emit(
GameLib.Event.GAME_DATA,
{
event: 'scoreUpdate',
score: this.score
}
);
if (this.score > this.kanisterSpawnScore) {
this.spawnEnemy(true);
}
this.explodeMesh(mesh);
};
@ -835,7 +833,7 @@ if (this.kanisterTime > this.kanisterLife) {
this.kanisters -= 1;
console.log('kanister count: ' + this.kanisters);
GameLib.Event.Emit(
GameLib.Event.GAME_DATA,
{
@ -945,5 +943,4 @@ this.enemies = this.enemies.reduce(
[]
);
return null;//# sourceURL=beforeRender.js
return null;//# sourceURL=beforeRender.js