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 committed 2015-05-27 22:03:33 -04:00
1 parent 2ff6ea0746
commit 56903744d8
2 files changed
+10 -2

No files matched your search

+5 -1
View File
@@ -1020,9 +1020,13 @@ 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 = '[W ' + Math.ceil(Game.goldenCookie.life / Game.fps) + ']';
}
else {
titleGC = '[G ' + Math.ceil(Game.goldenCookie.life / Game.fps) + ']'; 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) + ']';
} }
+5 -1
View File
@@ -682,9 +682,13 @@ 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 = '[W ' + Math.ceil(Game.goldenCookie.life / Game.fps) + ']';
}
else {
titleGC = '[G ' + Math.ceil(Game.goldenCookie.life / Game.fps) + ']'; 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) + ']';
} }