using System; using System.Collections.Generic; using UnityEngine; namespace TKS.OutGame { /// 영웅 레벨 1~60(hero_levels.csv · 기획서 §3-3) — 다음 레벨 경험·골드 · 누적 스탯 % · 해금 챕터. public class LevelTable : ScriptableObject { [Serializable] public class Row { public int lv; public int expToNext; public int goldCost; [Tooltip("이 레벨의 스탯 보너스 %(누적)")] public float statPct; [Tooltip("이 레벨까지 올리려면 클리어해야 하는 챕터")] public int capChapter; } public List rows = new List(); public Row Get(int lv) { foreach (var r in rows) if (r.lv == lv) return r; return null; } public int MaxLevel { get { int m = 1; foreach (var r in rows) m = Mathf.Max(m, r.lv); return m; } } /// 클리어 최고 챕터 chapterMax 로 올릴 수 있는 최대 레벨. public int CapFor(int chapterMax) { int cap = 1; foreach (var r in rows) if (r.capChapter <= chapterMax) cap = Mathf.Max(cap, r.lv); return cap; } } }