Made price of upgrade be required
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user