Update: CC - Before Render - Moorcow (qemp4een6t.js) 14 bytes modified
parent
fac5c4291d
commit
32cd2883f9
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
if (!this.entityLoaded) {
|
if (!this.entityLoaded) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -492,36 +490,18 @@ if (GameLib.Utils.UndefinedOrNull(this.initialized)) {
|
||||||
|
|
||||||
if (mesh.enemy.isKanister) {
|
if (mesh.enemy.isKanister) {
|
||||||
|
|
||||||
console.log('exploding kanister');
|
|
||||||
|
|
||||||
this.kanisters += 1;
|
this.kanisters += 1;
|
||||||
|
|
||||||
if (this.kanisters > 9) {
|
if (this.kanisters > 9) {
|
||||||
this.kanisters = 9;
|
this.kanisters = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('exploding kanister, total count: ' + this.kanisters);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
console.log('exploding enemy');
|
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.Emit(
|
||||||
GameLib.Event.GAME_DATA,
|
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);
|
this.explodeMesh(mesh);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -946,4 +944,3 @@ this.enemies = this.enemies.reduce(
|
||||||
);
|
);
|
||||||
|
|
||||||
return null;//# sourceURL=beforeRender.js
|
return null;//# sourceURL=beforeRender.js
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue