47 lines
1.6 KiB
C#
47 lines
1.6 KiB
C#
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
[Serializable]
|
|
public class AwakenUpgradeTableData : TableDataBase
|
|
{
|
|
public int n_AwakenStep; // 각성 단계
|
|
public int n_MaxUpgradeLevel; // 다음 단계 승급에 필요한 강화 횟수
|
|
public int n_AwakenGoodsCost; // 각성에 필요한 재화 수량
|
|
public int n_DefaultUpgradeCostValue; // 1레벨의 능력치 기본 값
|
|
public float f_CountPerUpgradeCostValue; // 강화 횟수 당 능력치 증가량
|
|
public float f_BalanceConstant; // 밸런스 상수 K값
|
|
|
|
public float Get_Price(int lv)
|
|
{
|
|
return base.Get_Value(lv, f_BalanceConstant, n_DefaultUpgradeCostValue, f_CountPerUpgradeCostValue, true);
|
|
}
|
|
}
|
|
|
|
public class table_awakenupgrade : table_missionbase
|
|
{
|
|
public static table_awakenupgrade Ins;
|
|
List<AwakenUpgradeTableData> tableDatas;
|
|
Dictionary<int, AwakenUpgradeTableData> dic_Data = new Dictionary<int, AwakenUpgradeTableData>();
|
|
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
Ins = this;
|
|
}
|
|
|
|
protected override void Start()
|
|
{
|
|
tableDatas = JsonConvert.DeserializeObject<List<AwakenUpgradeTableData>>(json_last);
|
|
for (int i = 0; i < Get_DataList().Count; i++)
|
|
{
|
|
var temp = Get_DataList()[i];
|
|
dic_Data.Add(temp.n_AwakenStep, temp);
|
|
}
|
|
|
|
base.Start();
|
|
}
|
|
|
|
public AwakenUpgradeTableData Get_Data_orNull(int lv) { return dic_Data[lv]; }
|
|
public List<AwakenUpgradeTableData> Get_DataList() { return tableDatas; }
|
|
} |