40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using Newtonsoft.Json;
|
|
using System.Collections.Generic;
|
|
|
|
public class GuideQuestTableData : MissionTableData
|
|
{
|
|
public string Target, TargetSub;
|
|
}
|
|
|
|
public class table_guidequest : table_missionbase
|
|
{
|
|
public static table_guidequest Ins;
|
|
List<GuideQuestTableData> tableDatas;
|
|
Dictionary<int, GuideQuestTableData> dic_Data = new Dictionary<int, GuideQuestTableData>();
|
|
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
Ins = this;
|
|
}
|
|
|
|
protected override void Start()
|
|
{
|
|
tableDatas = JsonConvert.DeserializeObject<List<GuideQuestTableData>>(json_last);
|
|
for (int i = 0; i < Get_DataList().Count; i++)
|
|
{
|
|
var temp = Get_DataList()[i];
|
|
dic_Data.Add(temp.n_MissionIndex, temp);
|
|
}
|
|
|
|
base.Start();
|
|
}
|
|
|
|
public List<GuideQuestTableData> Get_DataList() { return tableDatas; }
|
|
|
|
public GuideQuestTableData Get_Data(int _id)
|
|
{
|
|
if (dic_Data.ContainsKey(_id)) return dic_Data[_id];
|
|
return tableDatas[tableDatas.Count - 1];
|
|
}
|
|
} |