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

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

View File

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