mirror of
https://github.com/DerTyp7/grow-ai-unity.git
synced 2025-10-30 12:57:09 +01:00
added freetime etc
This commit is contained in:
23
Assets/Scripts/Managers/EconomyManager.cs
Normal file
23
Assets/Scripts/Managers/EconomyManager.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class EconomyManager : MonoBehaviour
|
||||
{
|
||||
public static EconomyManager instance;
|
||||
|
||||
[SerializeField]
|
||||
float money = 0.0f;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (instance == null)
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public void AddMoney(float value) => money += value;
|
||||
public float GetMoney() => money;
|
||||
public string GetMoneyStr() => money.ToString() + " <20>";
|
||||
public void SetMoney(float value) => money = value;
|
||||
public void RemoveMone(float value) => money -= value;
|
||||
}
|
||||
Reference in New Issue
Block a user