| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 | 
							- namespace GFGGame
 
- {
 
-     //主线剧情专用类
 
-     public class StoryController
 
-     {
 
-         public static void ShowLevelView(int levelCfgId, int needitemId = 0, int needItemCount = 0)
 
-         {
 
-             InstanceZonesController.ShowLevelView(levelCfgId, OnFinishStoryLevel, needitemId, needItemCount);
 
-         }
 
-         public static void OnFinishStoryLevel(int levelCfgId, bool firstPass, bool success)
 
-         {
 
-             if (success)
 
-             {
 
-                 //判断是否是首次打通最后一关
 
-                 int nextLevelID = levelCfgId + 1;
 
-                 StoryLevelCfg nextLevelCfg = StoryLevelCfgArray.Instance.GetCfg(nextLevelID);
 
-                 var fistPassLastLvl = (nextLevelCfg == null) && firstPass;
 
-                 if (fistPassLastLvl)
 
-                 {
 
-                     StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
 
-                     StoryChapterCfg nextStoryChapterCfg = StoryChapterCfgArray.Instance.GetCfg(levelCfg.chapterId + 1);
 
-                     if (nextStoryChapterCfg != null)
 
-                     {
 
-                         StoryLevelCfg nextChapterLevelCfg = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(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
 
-                 {
 
-                     ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, MainStoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW), true);
 
-                 }
 
-             }
 
-             else
 
-             {
 
-                 //异常返回到关卡列表界面
 
-                 ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, MainStoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW), true);
 
-             }
 
-         }
 
-         public static void ShowCardStoryDialog(CardStoryCfg cardStoryCfg, CardData cardData)
 
-         {
 
-             ViewManager.Show(ViewName.STORY_DIALOG_VIEW, new object[] { cardStoryCfg.storyStartID, true, new OnCompleteStoryDialogCall(OnCompleteCardStoryDialog), cardData }, null, true);
 
-         }
 
-         private static void OnCompleteCardStoryDialog(bool isSkip, object param)
 
-         {
 
-             CardData cardData = param as CardData;
 
-             ViewManager.Show(ViewName.CARD_FOSTER_VIEW, cardData, new object[] { ViewName.CARD_DETAIL_VIEW }, true);
 
-             ViewManager.Show(ViewName.CARD_STORY_VIEW, cardData);
 
-         }
 
-         public static void ShowPriorStoryDialog()
 
-         {
 
-             InstanceZonesDataManager.currentLevelCfgId = 100001001;
 
-             ViewManager.Show(ViewName.STORY_DIALOG_VIEW, new object[] { MainStoryDataManager.priorId, false, new OnCompleteStoryDialogCall(OnCompletePriorStoryDialog) }, null, true);
 
-         }
 
-         private static void OnCompletePriorStoryDialog(bool isSkip, object param)
 
-         {
 
-             ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, MainStoryDataManager.currentChapterCfgId, ViewManager.GetGoBackDatas(ViewName.STORY_CHAPTER_VIEW), true);
 
-         }
 
-         public static void ShowFilingStoryDialog(StoryLevelCfg storyLevelCfg)
 
-         {
 
-             InstanceZonesDataManager.currentLevelCfgId = storyLevelCfg.id;
 
-             ViewManager.Show(ViewName.STORY_DIALOG_VIEW, new object[] { storyLevelCfg.storyStartID, false, new OnCompleteStoryDialogCall(OnCompleteFilingStoryDialog) }, null, true);
 
-         }
 
-         private static void OnCompleteFilingStoryDialog(bool isSkip, object param)
 
-         {
 
-             InstanceZonesController.OnCompleteChapterStoryDialog(isSkip, param);
 
-             ViewManager.Show<StudioFilingView>(MainStoryDataManager.currentChapterCfgId, null, true);
 
-             //, ViewManager.GetGoBackDatas(typeof(StudioFilingView).FullName)
 
-         }
 
-     }
 
- }
 
 
  |