Made price of upgrade be required

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

No files matched your search

+12
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)