Merge branch 'master' into dev
Conflicts: CookieMonster.js src/Main.js
This commit is contained in:
@@ -639,6 +639,14 @@ CM.Disp.UpdateTimerBar = function() {
|
||||
if (Game.goldenCookie.life <= 0 && Game.goldenCookie.toDie == 0) {
|
||||
CM.Disp.TimerBarGC.style.display = '';
|
||||
l('CMTimerBarGCMinBar').style.width = Math.round(Math.max(0, Game.goldenCookie.minTime - Game.goldenCookie.time) * maxWidth / Game.goldenCookie.maxTime) + 'px';
|
||||
if (Game.goldenCookie.minTime == Game.goldenCookie.maxTime) {
|
||||
l('CMTimerBarGCMinBar').style.borderTopRightRadius = '10px';
|
||||
l('CMTimerBarGCMinBar').style.borderBottomRightRadius = '10px';
|
||||
}
|
||||
else {
|
||||
l('CMTimerBarGCMinBar').style.borderTopRightRadius = '';
|
||||
l('CMTimerBarGCMinBar').style.borderBottomRightRadius = '';
|
||||
}
|
||||
l('CMTimerBarGCBar').style.width = Math.round(Math.min(Game.goldenCookie.maxTime - Game.goldenCookie.minTime, Game.goldenCookie.maxTime - Game.goldenCookie.time) * maxWidth / Game.goldenCookie.maxTime) + 'px';
|
||||
l('CMTimerBarGCTime').textContent = Math.ceil((Game.goldenCookie.maxTime - Game.goldenCookie.time) / Game.fps);
|
||||
count++;
|
||||
@@ -816,6 +824,7 @@ CM.Disp.ToggleUpBarColor = function() {
|
||||
}
|
||||
|
||||
CM.Disp.UpdateUpgrades = function() {
|
||||
if (CM.Config.UpBarColor == 1) {
|
||||
var blue = 0;
|
||||
var green = 0;
|
||||
var yellow = 0;
|
||||
@@ -854,6 +863,7 @@ CM.Disp.UpdateUpgrades = function() {
|
||||
l('CMUpgradeBarPurple').textContent = purple;
|
||||
l('CMUpgradeBarGray').textContent = gray;
|
||||
}
|
||||
}
|
||||
|
||||
CM.Disp.CreateWhiteScreen = function() {
|
||||
CM.Disp.WhiteScreen = document.createElement('div');
|
||||
|
||||
10
src/Disp.js
10
src/Disp.js
@@ -320,6 +320,14 @@ CM.Disp.UpdateTimerBar = function() {
|
||||
if (Game.goldenCookie.life <= 0 && Game.goldenCookie.toDie == 0) {
|
||||
CM.Disp.TimerBarGC.style.display = '';
|
||||
l('CMTimerBarGCMinBar').style.width = Math.round(Math.max(0, Game.goldenCookie.minTime - Game.goldenCookie.time) * maxWidth / Game.goldenCookie.maxTime) + 'px';
|
||||
if (Game.goldenCookie.minTime == Game.goldenCookie.maxTime) {
|
||||
l('CMTimerBarGCMinBar').style.borderTopRightRadius = '10px';
|
||||
l('CMTimerBarGCMinBar').style.borderBottomRightRadius = '10px';
|
||||
}
|
||||
else {
|
||||
l('CMTimerBarGCMinBar').style.borderTopRightRadius = '';
|
||||
l('CMTimerBarGCMinBar').style.borderBottomRightRadius = '';
|
||||
}
|
||||
l('CMTimerBarGCBar').style.width = Math.round(Math.min(Game.goldenCookie.maxTime - Game.goldenCookie.minTime, Game.goldenCookie.maxTime - Game.goldenCookie.time) * maxWidth / Game.goldenCookie.maxTime) + 'px';
|
||||
l('CMTimerBarGCTime').textContent = Math.ceil((Game.goldenCookie.maxTime - Game.goldenCookie.time) / Game.fps);
|
||||
count++;
|
||||
@@ -497,6 +505,7 @@ CM.Disp.ToggleUpBarColor = function() {
|
||||
}
|
||||
|
||||
CM.Disp.UpdateUpgrades = function() {
|
||||
if (CM.Config.UpBarColor == 1) {
|
||||
var blue = 0;
|
||||
var green = 0;
|
||||
var yellow = 0;
|
||||
@@ -535,6 +544,7 @@ CM.Disp.UpdateUpgrades = function() {
|
||||
l('CMUpgradeBarPurple').textContent = purple;
|
||||
l('CMUpgradeBarGray').textContent = gray;
|
||||
}
|
||||
}
|
||||
|
||||
CM.Disp.CreateWhiteScreen = function() {
|
||||
CM.Disp.WhiteScreen = document.createElement('div');
|
||||
|
||||
Reference in New Issue
Block a user