using CodeStage.AntiCheat.ObscuredTypes; using MiniJSON; using System.Collections; using System.Collections.Generic; using UnityEngine; public class DPSTableData : TableDataBase { public ObscuredDouble Dmg; public ObscuredInt Step, Gem; } public class table_dps : MonoBehaviour { public static table_dps Ins; public TextAsset m_json; private List list_Data = new List(); private void Awake() { Ins = this; Dictionary jsonData = Json.Deserialize(m_json.text) as Dictionary; // ["items"]은 items.txt 안의 items를 가리킨다. 툴 우측 하단 파일 종류란에서 설정 가능. List obj = jsonData[GetType().Name] as List; foreach (object objt in obj) { var temp = new DPSTableData(); Dictionary json = objt as Dictionary; temp.Step = int.Parse(json["Step"].ToString()); temp.Gem = int.Parse(json["Gem"].ToString()); temp.Dmg = double.Parse(json["Dmg"].ToString()); list_Data.Add(temp); } } public List Get_DataList() { return list_Data; } public DPSTableData Get_Data_orNull(int _step) { if (_step <= list_Data.Count) return list_Data.Find(f => (f as DPSTableData).Step == _step) as DPSTableData; return null; } }