Files
Fruitomation/Assets/Scripts/Global/MoneyController.cs
2026-04-28 11:16:38 +01:00

31 lines
786 B
C#

using PashaBibko.Pacore.Attributes;
using Fruitomation.Game;
using UnityEngine;
namespace Fruitomation.Global
{
[CreateInstanceOnStart] public class MoneyController : MonoBehaviour
{
private static MoneyController Instance;
[SerializeField, InspectorReadOnly("Current Money")]
private CurrencyAmount InternalCurrentMoney = new();
public static CurrencyAmount Current => Instance.InternalCurrentMoney;
public static void Add(CurrencyAmount amount)
{
}
private void Awake()
{
if (Instance is not null)
{
Debug.LogError("Cannot have multiple instances of [MoneyController]");
return;
}
Instance = this;
}
}
}