31 lines
948 B
C#
31 lines
948 B
C#
|
|
using MiniJSON;
|
|||
|
|
using System.Collections;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
public class table_fairy : table_itemdatabase
|
|||
|
|
{
|
|||
|
|
public static table_fairy Ins;
|
|||
|
|
|
|||
|
|
public TextAsset m_json;
|
|||
|
|
|
|||
|
|
private void Awake()
|
|||
|
|
{
|
|||
|
|
Ins = this;
|
|||
|
|
|
|||
|
|
Dictionary<string, object> jsonData = Json.Deserialize(m_json.text) as Dictionary<string, object>;
|
|||
|
|
|
|||
|
|
// ["items"]<5D><> items.txt <20><><EFBFBD><EFBFBD> items<6D><73> <20><><EFBFBD><EFBFBD>Ų<EFBFBD><C5B2>. <20><> <20><><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
List<object> obj = jsonData[GetType().Name] as List<object>;
|
|||
|
|
|
|||
|
|
foreach (object objt in obj)
|
|||
|
|
{
|
|||
|
|
Dictionary<string, object> json = objt as Dictionary<string, object>;
|
|||
|
|
var temp = Read(eItem.Fairy, json);
|
|||
|
|
temp.Prefab = json["Prefab"].ToString();
|
|||
|
|
temp.Scale = float.Parse(json["Scale"].ToString());
|
|||
|
|
temp.UIScale = float.Parse(json["UIScale"].ToString());
|
|||
|
|
list_Data.Add(temp);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|