43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
|
|
using Newtonsoft.Json;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
|
||
|
|
public class EffectTableData : TableDataBase
|
||
|
|
{
|
||
|
|
public string s_Effect;
|
||
|
|
public int n_LoadAmount { get { return 1; } } // 정인호 : 로드 갯수 1개로 고정 (작업 효율성 ↑)
|
||
|
|
public float f_Scale, f_EffectDelay, f_PositionX, f_PositionY;
|
||
|
|
}
|
||
|
|
|
||
|
|
public class table_effect : table_base
|
||
|
|
{
|
||
|
|
public static table_effect Ins;
|
||
|
|
|
||
|
|
List<EffectTableData> tableDatas;
|
||
|
|
Dictionary<string, EffectTableData> dic_data = new Dictionary<string, EffectTableData>();
|
||
|
|
|
||
|
|
protected override void Awake()
|
||
|
|
{
|
||
|
|
Ins = this;
|
||
|
|
base.Awake();
|
||
|
|
}
|
||
|
|
|
||
|
|
protected override void Start()
|
||
|
|
{
|
||
|
|
tableDatas = JsonConvert.DeserializeObject<List<EffectTableData>>(json_last);
|
||
|
|
for (int i = 0; i < tableDatas.Count; i++)
|
||
|
|
{
|
||
|
|
#if UNITY_EDITOR
|
||
|
|
if (dic_data.ContainsKey(tableDatas[i].s_Effect))
|
||
|
|
{
|
||
|
|
MyEditorDialog.Show_Dialog($"{tableDatas[i].s_Effect} 이펙트가 중복됩니다.");
|
||
|
|
continue;
|
||
|
|
}
|
||
|
|
#endif
|
||
|
|
dic_data.Add(tableDatas[i].s_Effect, tableDatas[i]);
|
||
|
|
}
|
||
|
|
base.Start();
|
||
|
|
}
|
||
|
|
|
||
|
|
public List<EffectTableData> Get_DataList() { return tableDatas; }
|
||
|
|
public EffectTableData Get_Data(string effect) { return dic_data[effect]; }
|
||
|
|
}
|