Made money save to file
This commit is contained in:
@@ -9,8 +9,8 @@ namespace Fruitomation.Global
|
||||
private static MoneyController Instance;
|
||||
|
||||
[SerializeField, InspectorReadOnly("Current Money")]
|
||||
private double InternalCurrentMoney = new();
|
||||
public static double Current => Instance.InternalCurrentMoney;
|
||||
private double InternalCurrentMoney;
|
||||
public static double CurrentAmount => Instance.InternalCurrentMoney;
|
||||
|
||||
public static void Add(double amount)
|
||||
{
|
||||
@@ -39,5 +39,10 @@ namespace Fruitomation.Global
|
||||
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
InternalCurrentMoney = PlayerInfo.Data.CurrentMoney;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user