|
@@ -25,7 +25,7 @@ namespace GFGGame
|
|
|
|
|
|
public static void OnFinishStoryLevel(int levelCfgId, bool firstPass, bool success)
|
|
|
{
|
|
|
- if(success)
|
|
|
+ if (success)
|
|
|
{
|
|
|
//判断是否是首次打通最后一关
|
|
|
int nextLevelID = levelCfgId + 1;
|
|
@@ -34,6 +34,20 @@ namespace GFGGame
|
|
|
|
|
|
if (fistPassLastLvl)
|
|
|
{
|
|
|
+ StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
|
|
|
+ StoryChapterCfg nextStoryChapterCfg = StoryChapterCfgArray.Instance.GetCfg(levelCfg.chapterId + 1);
|
|
|
+ if (nextStoryChapterCfg != null)
|
|
|
+ {
|
|
|
+ StoryLevelCfg nextChapterLevelCfg = StoryLevelCfgArray.Instance.GetCfgs(nextStoryChapterCfg.type, nextStoryChapterCfg.subType, nextStoryChapterCfg.id)[0];
|
|
|
+
|
|
|
+ int LevelID = nextChapterLevelCfg.id;
|
|
|
+ MainStoryDataManager.currentLevelCfgId = LevelID;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ MainStoryDataManager.currentLevelCfgId = 0;
|
|
|
+
|
|
|
+ }
|
|
|
ViewManager.Show(ViewName.STORY_CHAPTER_LIST_VIEW, null, null, true);
|
|
|
}
|
|
|
else
|