Updated to use CurrencyAmmount
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using PashaBibko.Pacore.Attributes;
|
||||
using Fruitomation.Game;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Fruitomation.Global
|
||||
@@ -7,16 +8,14 @@ namespace Fruitomation.Global
|
||||
{
|
||||
private static MoneyController Instance;
|
||||
|
||||
[SerializeField, InspectorReadOnly("Game State")] private double InternalCurrentMoney;
|
||||
[SerializeField, InspectorReadOnly("Current Money")]
|
||||
private CurrencyAmount InternalCurrentMoney = new();
|
||||
public static CurrencyAmount Current => Instance.InternalCurrentMoney;
|
||||
|
||||
public static double Current
|
||||
public static void Add(CurrencyAmount amount)
|
||||
{
|
||||
get => Instance.InternalCurrentMoney;
|
||||
set => Instance.InternalCurrentMoney = value;
|
||||
}
|
||||
|
||||
public static void Add(double amount) => Instance.InternalCurrentMoney += amount;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Instance is not null)
|
||||
|
||||
Reference in New Issue
Block a user