Added an indication in the title bar on the type of golden cookie spawned (Issue #39) and tiny cleanup of code

This commit is contained in:
Aktanusa
2015-05-27 22:03:33 -04:00
parent 2ff6ea0746
commit 56903744d8
2 changed files with 12 additions and 4 deletions

View File

@@ -682,8 +682,12 @@ CM.Disp.UpdateTitle = function() {
var titleGC;
var titleSP;
if (l('goldenCookie').style.display != 'none') {
addGC = true;
titleGC = '[G ' + Math.ceil(Game.goldenCookie.life / Game.fps) + ']';
if (Game.goldenCookie.wrath) {
titleGC = '[W ' + Math.ceil(Game.goldenCookie.life / Game.fps) + ']';
}
else {
titleGC = '[G ' + Math.ceil(Game.goldenCookie.life / Game.fps) + ']';
}
}
else {
titleGC = '[' + Math.ceil((Game.goldenCookie.maxTime - Game.goldenCookie.time) / Game.fps) + ']';