OneShotOneKill/Assets/Script/Table/Tables/table_projectile.cs

42 lines
1.2 KiB
C#
Raw Normal View History

2026-01-07 21:27:42 +00:00
using Newtonsoft.Json;
using System.Collections.Generic;
public class ProjectileTableData : TableDataBase
{
public string s_Projectile, s_Effect;
public int n_LoadAmount { get { return 1; } } // 정인호 : 로드 갯수 1개로 고정 (작업 효율성 ↑)
public float f_Scale, f_PositionX, f_PositionY;
public bool b_FilpX;
}
public class table_projectile : table_base
{
public static table_projectile Ins;
List<ProjectileTableData> tableDatas;
Dictionary<string, ProjectileTableData> dic_data = new Dictionary<string, ProjectileTableData>();
protected override void Awake()
{
Ins = this;
base.Awake();
}
protected override void Start()
{
tableDatas = JsonConvert.DeserializeObject<List<ProjectileTableData>>(json_last);
for (int i = 0; i < tableDatas.Count; i++)
{
#if UNITY_EDITOR
if (dic_data.ContainsKey(tableDatas[i].s_Projectile))
{
MyEditorDialog.Show_Dialog($"{tableDatas[i].s_Projectile} 투사체가 중복됩니다.");
continue;
}
#endif
}
base.Start();
}
public List<ProjectileTableData> Get_DataList() { return tableDatas; }
}