CapersProject/Assets/02.Scripts/DataManager.cs
Nam Tae Gun 7fb0da5888 #25, #26 아이템 직접 획득 방식 추가 및 선형적인 맵 구조 변경
+ Item관련 Excel, Json, So 수정
+ DropItemTable 로직 수정
+ 아이템 프리팹에서 Enable Interaction 체크하면 직접 룻팅, 해제하면 자동 룻팅
+ 체력회복 아이템 추가
+ 개발자 메뉴 상호작용 "F1" 키를 통해 접근 가능
+ 보스 맵은 마법진을 상호작용하면 보스전 시작
+ 맵 안에서 교전 중일 때, 투명 벽 쉐이더 추가
+ 맵 마다의 통로를 통해서 이동 가능
+ 선형적인 맵 구조에 맞게 리소스 및 위치 수정
+ 타이틀 화면으로 이동할 때 나타나는 오류 수정(CombatUiManager OnDisable 싱글톤 문제)

Closes #25, #26
2024-06-22 07:11:53 +09:00

57 lines
1.6 KiB
C#

using BlueWater.Players.Combat;
using Sirenix.OdinInspector;
using UnityEngine;
namespace BlueWater
{
public enum SaveStage
{
None = 0,
TitanSlime = 3,
Rhinoceros = 4,
SandMole = 5
}
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;
// }
}
}