|
@@ -301,36 +301,7 @@ namespace GFGGame
|
|
|
|
|
|
private void OnClickBtnMain()
|
|
|
{
|
|
|
- LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.CHUN_ZHONG_LOU, 1);
|
|
|
- if (isOpen) return;
|
|
|
- isOpen = true;
|
|
|
- List<StoryChapterCfg> _chapterCfgs = StoryChapterCfgArray.Instance.GetCfgsBysubType(0);
|
|
|
- for (int i = 0; i < _chapterCfgs.Count; i++)
|
|
|
- {
|
|
|
- StoryChapterCfg chapterCfg = _chapterCfgs[i];
|
|
|
- if (i == _chapterCfgs.Count - 1 && MainStoryDataManager.CheckChapterUnlock(chapterCfg.id))
|
|
|
- {
|
|
|
- ViewManager.Show<StoryChapterView>(new object[] { chapterCfg.id, 0 });
|
|
|
- isOpen = false;
|
|
|
- return;
|
|
|
- }
|
|
|
- else if (!MainStoryDataManager.CheckChapterUnlock(chapterCfg.id))
|
|
|
- {
|
|
|
- StoryChapterCfg chapterTowCfg = _chapterCfgs[Mathf.Max(0, i - 1)];
|
|
|
- var list = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(chapterTowCfg.type, chapterTowCfg.subType, chapterTowCfg.id);
|
|
|
- StoryLevelCfg lastLevelCfg = list[list.Count - 1];
|
|
|
- //这里是当下一章没解锁,但是上一章的最后一关已经通过了
|
|
|
- if (lastLevelCfg != null && InstanceZonesDataManager.CheckLevelPass(lastLevelCfg.id))//MainStoryDataManager.CheckLevelUnlock(lastLevelCfg.id))
|
|
|
- {
|
|
|
- ViewManager.Show<StoryChapterListView>(new object[] { 0 ,Mathf.Max(0, chapterCfg.order - 1 )});
|
|
|
- isOpen = false;
|
|
|
- return;
|
|
|
- }
|
|
|
- ViewManager.Show<StoryChapterView>(new object[] { chapterCfg.id - 1, 0 });
|
|
|
- isOpen = false;
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
+ isOpen = MainControllerr.GotoStoryChapter(isOpen);
|
|
|
}
|
|
|
|
|
|
private void OnClickBtnHuanZhuang()
|