Made price of upgrade be required

This commit is contained in:
Pasha Bibko
2026-04-28 16:22:12 +01:00
parent 631d5691ff
commit 0ccf979869
5 changed files with 161 additions and 175 deletions

View File

@@ -17,6 +17,18 @@ namespace Fruitomation.Global
Instance.InternalCurrentMoney += amount;
}
public static bool CanBuy(double amount)
{
double val = Instance.InternalCurrentMoney - amount;
if (val > 0f)
{
Instance.InternalCurrentMoney = val;
return true;
}
return false;
}
private void Awake()
{
if (Instance is not null)