public JuQingCopySceneData()
        {
            m_LevelInfoDic.Clear();
            m_ChapterInfoDic.Clear();

            var chapterDic = TableManager.GetStoryCopySceneChapter();
            var levelDic   = TableManager.GetStoryCopyScene();

            foreach (var chapterList in chapterDic)
            {
                var chapterTable = chapterList.Value [0];
                if (chapterTable != null)
                {
                    StoryCopySceneChapterInfo info = new StoryCopySceneChapterInfo();
                    info.m_nID              = chapterTable.Id;
                    info.m_bAwardGot        = new List <bool>();
                    info.m_bLevelAwardGot   = new List <bool>();
                    info._ContaindLevelList = new List <int> ();
                    foreach (var levelList in levelDic)
                    {
                        var levelTable = levelList.Value [0];
                        if (levelTable != null && levelTable.BelongToChapterID == chapterTable.Id)
                        {
                            info._ContaindLevelList.Add(levelTable.Id);
                        }
                    }
                    m_ChapterInfoDic[info.m_nID] = info;
                }
            }

            Messenger.AddListener(MessengerConst.OnEnterSceneFinish, OnEnterSceneFinish);
        }
        public bool IsHaveUngotAward()
        {
            var chapterInfoList = GetChapterInfoList();

            for (int i = 0; i < chapterInfoList.Count; i++)
            {
                StoryCopySceneChapterInfo currentChapterInfo = chapterInfoList[i];
                int nChapterID = currentChapterInfo.m_nID;
                if (IsHaveChapterUngotAward(nChapterID))
                {
                    return(true);
                }
            }
            return(false);
        }
        public int GetLastChapterID()
        {
            int nBakSelectChapter = 1;
            var chapterInfoList   = GetChapterInfoList();

            for (int i = 0; i < chapterInfoList.Count; i++)
            {
                int nPreChapterIndex = 0;
                if (i != 0)
                {
                    nPreChapterIndex = i - 1;
                }

                StoryCopySceneChapterInfo preChapterInfo     = chapterInfoList[nPreChapterIndex];
                StoryCopySceneChapterInfo currentChapterInfo = chapterInfoList[i];

                for (int j = 0; j < 4; j++)
                {
                    int  levelID = currentChapterInfo._ContaindLevelList [j];
                    bool bLocked = IsStoryCopySceneLocked(levelID);
                    if (bLocked && j == 0)
                    {
                        return(preChapterInfo.m_nID);
                    }
                    if (bLocked && j != 0)
                    {
                        return(currentChapterInfo.m_nID);
                    }

                    // 如果有没过关的,显示没过关的章节
                    if (!IsPass(levelID))
                    {
                        nBakSelectChapter = currentChapterInfo.m_nID;
                    }
                }
            }

            return(nBakSelectChapter);
        }