public List <LevelViewData> GetLevelListByType(Def.levelType type) { List <LevelViewData> list = new List <LevelViewData>(); levelList = new List <LevelData>(); int id = curChapterData.csv_id * 1000; id += (int)type * 100; levelmax = curChapterData.typeMax[(int)type]; for (int i = 0; i < levelmax; i++) { LevelViewData v = new LevelViewData(); v.data = GameShared.Instance.GetLevelById(id + i + 1); if (v.data.checkpoint <= curChapterData.curLevel[(int)type]) { v.unlock = true; } else { v.unlock = false; } list.Add(v); levelList.Add(v.data); } return(list); }
public void InitData(LevelViewData d) { data = d; SetIcon(); }