CapersProject/Assets/02.Scripts/DataManager.cs
2024-06-04 03:26:03 +09:00

57 lines
1.6 KiB
C#

using BlueWater.Players.Combat;
using Sirenix.OdinInspector;
using UnityEngine;
namespace BlueWater
{
public enum SaveStage
{
FirstTutorial = 0,
SecondTutorial,
Slime,
Rhinoceros
}
public class DataManager : Singleton<DataManager>
{
public SaveStage CurrentSaveStage { get; set; }
[field: Title("Inventory")]
[field: SerializeField] public CombatInventory CombatInventory { get; private set; } = new();
public int Gold { get; set; } = 0;
// /// <summary>
// /// Dictionary 초기화 함수
// /// </summary>
// private Dictionary<string, T> CreateDictionaryFromList<T>(List<T> list, int capacity) where T : IIdx
// {
// var newDictionary = new Dictionary<string, T>(capacity);
//
// foreach (var item in list)
// {
// newDictionary.Add(item.Idx, item);
// }
//
// return newDictionary;
// }
//
// [ContextMenu("Json To So")]
// public void MakeDataSoFromJson()
// {
// NpcDataSo.npcDataList = GetJsonData<List<NpcData>>("JSON/customer_table.json");
//
// #if UNITY_EDITOR_OSX || UNITY_EDITOR_WIN
// EditorUtility.SetDirty(NpcDataSo);
// #endif
// }
//
// private static T GetJsonData<T>(string path)
// {
// var jsonString = File.ReadAllText(SystemPath.GetPath(path));
// var data = JsonConvert.DeserializeObject<T>(jsonString);
// return data;
// }
}
}