function CheckUpgrades(){
if(cookies >= 1000){
document.getElementById("upgrades").style.removeProperty("display");
}
if (clickMultiplier == 2){
document.getElementById("upgrades").style.display = "none";
//cookies = cookies - 500; MAKES IT GO IN REVERSE
}
}
我在一个区间内有这个,因为我需要继续检查条件。
答案 0 :(得分:0)
我将代码更改为修复它的代码。
var upgradeBought = false; var upgradePossible = false;
function CheckUpgrades(){ if(upgradePossible){ if(!upgradeBought)document.getElementById("升级")。style.removeProperty(" display"); else document.getElementById("升级")。style.display =" none&#34 ;; }
if(cookies >= 1000) upgradePossible = true;
} 的setInterval(CheckUpgrades 1000/60);