private void SetChapterList() { foreach (var item in Cfg_Chapter.GetAllCfg()) { UI_ListItem = UIBase.InitListItem(ChapterListObj); UI_ListItem.Texts[0].text = item.Name; string Asset = COMMON.ChapterIconPath + item.Asset; UIBase.SetImageSpite(UI_ListItem.Images[0], Asset); if (!AlreadyPass.Contains(item.NeedMap)) { COMMON.SetImageGray(UI_ListItem.Images[0]); } UI_ListItem.btns[0].onClick.AddListener(delegate() { if (!AlreadyPass.Contains(item.NeedMap)) { UIBase.Addtips("请先通关上一章节!"); return; } OpenMapList(item.StartMap); MapList_ChapterName.text = item.Name; }); } }