Exemple #1
0
        private static void SetRewardItem(GameObject item, PVE_CHAPTER_COMPLETE_INFO chapterInfo, int stars, int chapterNo)
        {
            item.CustomSetActive(true);
            int num = CAdventureSys.LEVEL_PER_CHAPTER * CAdventureSys.STAR_PER_LEVEL;

            if (stars == num)
            {
                if (chapterInfo.bIsGetBonus > 0)
                {
                    item.transform.FindChild("Unlock/RewardBox").GetComponent <Image>().color = Color.gray;
                    item.transform.FindChild("Unlock/StarText").GetComponent <Text>().text    = Singleton <CTextManager> .instance.GetText("hasGot");
                }
                else
                {
                    item.transform.FindChild("Unlock/RewardBox").GetComponent <Image>().color = Color.white;
                    item.transform.FindChild("Unlock/StarText").GetComponent <Text>().text    = string.Format("{0}/{1}", stars, num);
                }
            }
            else
            {
                item.transform.FindChild("Unlock/RewardBox").GetComponent <Image>().color = Color.gray;
                item.transform.FindChild("Unlock/StarText").GetComponent <Text>().text    = string.Format("{0}/{1}", stars, num);
            }
            item.transform.FindChild("Unlock/RewardBox").GetComponent <CUIEventScript>().m_onClickEventParams.tag = chapterNo + 1;
        }
        public static void InitChapterElement(CUIFormScript formScript, int currentChapter, int levelNo, int difficulty)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo == null)
            {
                return;
            }
            PVE_ADV_COMPLETE_INFO     pVE_ADV_COMPLETE_INFO     = masterRoleInfo.pveLevelDetail[difficulty - 1];
            PVE_CHAPTER_COMPLETE_INFO pVE_CHAPTER_COMPLETE_INFO = pVE_ADV_COMPLETE_INFO.ChapterDetailList[currentChapter - 1];

            PVE_LEVEL_COMPLETE_INFO[] levelDetailList = pVE_CHAPTER_COMPLETE_INFO.LevelDetailList;
            ResLevelCfgInfo           dataByKey       = GameDataMgr.levelDatabin.GetDataByKey((long)levelDetailList[levelNo - 1].iLevelID);

            if (dataByKey == null)
            {
                return;
            }
            formScript.transform.FindChild("ChapterElement/ChapterImg").GetComponent <Image>().SetSprite(CAdventureView.GetLevelBgPath(currentChapter, levelNo, difficulty), formScript, true, false, false, false);
            formScript.transform.FindChild("ChapterElement/ChapterNameText").GetComponent <Text>().text  = Utility.UTF8Convert(dataByKey.szName);
            formScript.transform.FindChild("ChapterElement/ChapterDEscText").GetComponent <Text>().text  = Utility.UTF8Convert(dataByKey.szLevelDesc);
            formScript.transform.FindChild("ChapterElement/RecPlayerLvlText").GetComponent <Text>().text = Singleton <CTextManager> .get_instance().GetText("Level_Recommend_Tips_1", new string[]
            {
                dataByKey.RecommendLevel[difficulty - 1].ToString()
            });

            formScript.transform.FindChild("Bg").GetComponent <Image>().color = CAdventureView.s_Adv_Difficult_Bg_Color[difficulty - 1];
        }
Exemple #3
0
        public bool CheckUnlock(uint id)
        {
            bool flag = false;
            ResUnlockCondition dataByKey = GameDataMgr.unlockConditionDatabin.GetDataByKey(id);

            object[] inParameters = new object[] { id };
            DebugHelper.Assert(dataByKey != null, "ResUnlockCondition[{0}] can not be find.", inParameters);
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo();

            DebugHelper.Assert(masterRoleInfo != null, "roleinfo can't be null in CheckUnlock");
            if ((masterRoleInfo != null) && (dataByKey != null))
            {
                switch (dataByKey.wUnlockType)
                {
                case 1:
                    return(masterRoleInfo.PvpLevel >= dataByKey.UnlockParam[0]);

                case 2:
                {
                    int             num       = (int)dataByKey.UnlockParam[0];
                    int             num2      = (int)dataByKey.UnlockParam[1];
                    int             index     = 0;
                    ResLevelCfgInfo info2     = GameDataMgr.levelDatabin.GetDataByKey((long)num);
                    object[]        objArray2 = new object[] { num };
                    DebugHelper.Assert(info2 != null, "can't find level = {0}", objArray2);
                    flag = false;
                    if (((info2 != null) && (info2 != null)) && ((masterRoleInfo.pveLevelDetail[index] != null) && (masterRoleInfo.pveLevelDetail[index].ChapterDetailList[info2.iChapterId - 1] != null)))
                    {
                        PVE_CHAPTER_COMPLETE_INFO pve_chapter_complete_info = masterRoleInfo.pveLevelDetail[index].ChapterDetailList[info2.iChapterId - 1];
                        for (int i = 0; i < pve_chapter_complete_info.LevelDetailList.Length; i++)
                        {
                            PVE_LEVEL_COMPLETE_INFO pve_level_complete_info = pve_chapter_complete_info.LevelDetailList[i];
                            if ((pve_level_complete_info != null) && (pve_level_complete_info.iLevelID == num))
                            {
                                flag = (pve_level_complete_info.levelStatus == 1) && (num2 <= CAdventureSys.GetStarNum(pve_level_complete_info.bStarBits));
                                break;
                            }
                        }
                    }
                    return(true);
                }

                case 3:
                    return(flag);

                case 4:
                {
                    uint num5 = 0;
                    if (masterRoleInfo.pvpDetail != null)
                    {
                        num5 = (masterRoleInfo.pvpDetail.stOneVsOneInfo.dwTotalNum + masterRoleInfo.pvpDetail.stTwoVsTwoInfo.dwTotalNum) + masterRoleInfo.pvpDetail.stThreeVsThreeInfo.dwTotalNum;
                    }
                    return((dataByKey.UnlockParam[0] <= num5) && (dataByKey.UnlockParam[1] <= masterRoleInfo.PvpLevel));
                }
                }
            }
            return(flag);
        }
Exemple #4
0
        public static void InitLevelList(CUIFormScript form, int currentChapter, int levelNo, int difficulty)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo != null)
            {
                ResChapterInfo dataByKey = GameDataMgr.chapterInfoDatabin.GetDataByKey(currentChapter);
                DebugHelper.Assert(dataByKey != null);
                bool flag = Singleton <CFunctionUnlockSys> .instance.ChapterIsUnlock(dataByKey.dwChapterId);

                PVE_ADV_COMPLETE_INFO     pve_adv_complete_info     = masterRoleInfo.pveLevelDetail[difficulty - 1];
                PVE_CHAPTER_COMPLETE_INFO pve_chapter_complete_info = pve_adv_complete_info.ChapterDetailList[currentChapter - 1];
                PVE_LEVEL_COMPLETE_INFO[] levelDetailList           = pve_chapter_complete_info.LevelDetailList;
                CUIListScript             component = form.transform.FindChild("LevelList").GetComponent <CUIListScript>();
                component.SetElementAmount(levelDetailList.Length);
                CUIListElementScript elemenet = null;
                Sprite     sprite             = CUIUtility.GetSpritePrefeb(GetLevelFramePath(difficulty), false, false).GetComponent <SpriteRenderer>().sprite;
                GameObject prefab             = CUIUtility.GetSpritePrefeb(GetLevelSelectFramePath(difficulty), false, false);
                for (int i = 0; i < levelDetailList.Length; i++)
                {
                    elemenet = component.GetElemenet(i);
                    ResLevelCfgInfo info3        = GameDataMgr.levelDatabin.GetDataByKey(levelDetailList[i].iLevelID);
                    object[]        inParameters = new object[] { levelDetailList[i].iLevelID };
                    DebugHelper.Assert(info3 != null, "Can't find LevelConfig = {0}", inParameters);
                    bool bActive = (levelDetailList[i].levelStatus == 0) || !flag;
                    bool flag3   = (levelDetailList[i].levelStatus == 1) && flag;
                    int  starNum = CAdventureSys.GetStarNum(levelDetailList[i].bStarBits);
                    elemenet.transform.FindChild("Unlock/star1").GetComponent <Image>().color   = (starNum < 1) ? CUIUtility.s_Color_GrayShader : Color.white;
                    elemenet.transform.FindChild("Unlock/star2").GetComponent <Image>().color   = (starNum < 2) ? CUIUtility.s_Color_GrayShader : Color.white;
                    elemenet.transform.FindChild("Unlock/star3").GetComponent <Image>().color   = (starNum < 3) ? CUIUtility.s_Color_GrayShader : Color.white;
                    elemenet.transform.FindChild("TxtLevelNameText").GetComponent <Text>().text = Utility.UTF8Convert(info3.szName);
                    if ((levelNo == (i + 1)) && !bActive)
                    {
                        elemenet.transform.FindChild("TxtLevelNameText").GetComponent <Text>().color = s_Adv_Level_Colors[0];
                    }
                    else if (!bActive)
                    {
                        elemenet.transform.FindChild("TxtLevelNameText").GetComponent <Text>().color = s_Adv_Level_Colors[1];
                    }
                    else
                    {
                        elemenet.transform.FindChild("TxtLevelNameText").GetComponent <Text>().color = s_Adv_Level_Colors[2];
                    }
                    elemenet.transform.FindChild("SelectedFrame").GetComponent <Image>().color        = s_Adv_Difficult_Color[difficulty - 1];
                    elemenet.transform.FindChild("SelectedFrame/Image1").GetComponent <Image>().color = s_Adv_Difficult_Color[((s_Adv_Difficult_Color.Length / 2) + difficulty) - 1];
                    elemenet.transform.FindChild("SelectedFrame/Image2").GetComponent <Image>().color = s_Adv_Difficult_Color[((s_Adv_Difficult_Color.Length / 2) + difficulty) - 1];
                    elemenet.transform.FindChild("SelectedFrame/SelectedFrame").GetComponent <Image>().SetSprite(prefab);
                    elemenet.transform.FindChild("New").gameObject.CustomSetActive(flag3);
                    elemenet.GetComponent <CUIEventScript>().m_onClickEventID         = enUIEventID.Adv_SelectLevel;
                    elemenet.GetComponent <CUIEventScript>().m_onClickEventParams.tag = i + 1;
                    elemenet.transform.FindChild("Unlock").gameObject.CustomSetActive(!bActive);
                    elemenet.transform.FindChild("Lock").gameObject.CustomSetActive(bActive);
                    elemenet.m_selectedSprite = sprite;
                    elemenet.GetComponent <Image>().SetSprite(((levelNo - 1) != i) ? elemenet.m_defaultSprite : sprite, elemenet.m_selectedLayout);
                }
                component.SelectElement(levelNo - 1, true);
            }
        }
Exemple #5
0
        public static void InitChapterList(CUIFormScript formScript, int currentChapter, int levelNo, int difficulty)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo != null)
            {
                CUIListScript             component             = formScript.transform.FindChild("ChapterList").GetComponent <CUIListScript>();
                PVE_ADV_COMPLETE_INFO     pve_adv_complete_info = masterRoleInfo.pveLevelDetail[difficulty - 1];
                PVE_CHAPTER_COMPLETE_INFO chapterInfo           = null;
                CUIListElementScript      elemenet = null;
                int    stars       = 0;
                string prefabPath  = string.Empty;
                string chapterName = string.Empty;
                component.SetElementAmount(CAdventureSys.CHAPTER_NUM);
                for (int i = 0; i < CAdventureSys.CHAPTER_NUM; i++)
                {
                    ResChapterInfo dataByIndex = GameDataMgr.chapterInfoDatabin.GetDataByIndex(i);
                    DebugHelper.Assert(dataByIndex != null);
                    bool bActive = Singleton <CFunctionUnlockSys> .instance.ChapterIsUnlock(dataByIndex.dwChapterId);

                    bool flag2 = i == (Singleton <CAdventureSys> .instance.bNewChapterId - 1);
                    chapterInfo = pve_adv_complete_info.ChapterDetailList[i];
                    elemenet    = component.GetElemenet(i);
                    stars       = CAdventureSys.GetChapterTotalStar(chapterInfo);
                    SetRewardItem(elemenet.gameObject, chapterInfo, stars, i);
                    chapterName = GetChapterName(i + 1);
                    elemenet.transform.FindChild("ChapterNameText").GetComponent <Text>().text = chapterName;
                    if ((currentChapter == (i + 1)) && bActive)
                    {
                        elemenet.transform.FindChild("ChapterNameText").GetComponent <Text>().color = s_Adv_Chaptper_Colors[0];
                    }
                    else if (bActive)
                    {
                        elemenet.transform.FindChild("ChapterNameText").GetComponent <Text>().color = s_Adv_Chaptper_Colors[1];
                    }
                    else
                    {
                        elemenet.transform.FindChild("ChapterNameText").GetComponent <Text>().color = s_Adv_Chaptper_Colors[2];
                    }
                    elemenet.GetComponent <CUIEventScript>().m_onClickEventID         = enUIEventID.Adv_SelectChapter;
                    elemenet.GetComponent <CUIEventScript>().m_onClickEventParams.tag = i + 1;
                    elemenet.transform.FindChild("Lock").gameObject.CustomSetActive(!bActive);
                    elemenet.transform.FindChild("Unlock").gameObject.CustomSetActive(bActive);
                    prefabPath = GetChapterBgPath(i + 1);
                    elemenet.transform.FindChild("BackgroundImg").GetComponent <Image>().SetSprite(prefabPath, component.m_belongedFormScript, true, false, false);
                    elemenet.transform.FindChild("Lock/SelectedImg").GetComponent <Image>().SetSprite(prefabPath, component.m_belongedFormScript, true, false, false);
                    elemenet.transform.FindChild("Lock/LockText").GetComponent <Text>().text = Utility.UTF8Convert(dataByIndex.szLockedTip);
                    elemenet.transform.FindChild("New").gameObject.CustomSetActive(flag2);
                }
                component.SelectElement(currentChapter - 1, true);
                component.MoveElementInScrollArea(currentChapter - 1, true);
            }
        }
        public static void InitDifficultList(CUIFormScript form, int currentChapter, int levelNo, int difficulty)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo == null)
            {
                return;
            }
            CUIListScript component              = form.transform.FindChild("DifficultList").GetComponent <CUIListScript>();
            string        text                   = string.Empty;
            string        prefabPath             = string.Empty;
            int           lEVEL_DIFFICULT_OPENED = CAdventureSys.LEVEL_DIFFICULT_OPENED;

            component.SetElementAmount(lEVEL_DIFFICULT_OPENED);
            for (int i = 0; i < lEVEL_DIFFICULT_OPENED; i++)
            {
                bool flag = CAdventureSys.IsDifOpen(currentChapter, i + 1);
                prefabPath = CAdventureView.GetDifficultIcon(i + 1);
                CUIListElementScript elemenet = component.GetElemenet(i);
                Image component2 = elemenet.transform.FindChild("DifficultImg").GetComponent <Image>();
                component2.SetSprite(prefabPath, form, true, false, false, false);
                component2.color = ((!flag) ? CAdventureView.s_Adv_Difficulty_Gray_Color : Color.white);
                elemenet.transform.FindChild("SelectedFrame").GetComponent <Image>().SetSprite(prefabPath, form, true, false, false, false);
                text = Singleton <CTextManager> .get_instance().GetText(string.Format("Adventure_Level_{0}", i + 1));

                elemenet.transform.FindChild("DifficultImg/DifficultText").GetComponent <Text>().text  = text;
                elemenet.transform.FindChild("SelectedFrame/DifficultText").GetComponent <Text>().text = text;
                elemenet.GetComponent <CUIEventScript>().m_onClickEventID         = enUIEventID.Adv_SelectDifficult;
                elemenet.GetComponent <CUIEventScript>().m_onClickEventParams.tag = i + 1;
                elemenet.transform.FindChild("SelectedFrame/Frame_circle").GetComponent <Image>().color = CAdventureView.s_Adv_Difficult_Circle_Color[i];
                PVE_ADV_COMPLETE_INFO     pVE_ADV_COMPLETE_INFO     = masterRoleInfo.pveLevelDetail[i];
                PVE_CHAPTER_COMPLETE_INFO pVE_CHAPTER_COMPLETE_INFO = pVE_ADV_COMPLETE_INFO.ChapterDetailList[currentChapter - 1];
                int chapterTotalStar = CAdventureSys.GetChapterTotalStar(pVE_CHAPTER_COMPLETE_INFO);
                elemenet.transform.FindChild("SelectedFrame/RewardBox").gameObject.CustomSetActive(chapterTotalStar == CAdventureSys.LEVEL_PER_CHAPTER * CAdventureSys.STAR_PER_LEVEL && pVE_CHAPTER_COMPLETE_INFO.bIsGetBonus == 0);
                elemenet.transform.FindChild("Lock").gameObject.CustomSetActive(!flag);
            }
            component.SelectElement(difficulty - 1, true);
        }
        public bool CheckUnlock(uint id)
        {
            bool result = false;
            ResUnlockCondition dataByKey = GameDataMgr.unlockConditionDatabin.GetDataByKey(id);

            DebugHelper.Assert(dataByKey != null, "ResUnlockCondition[{0}] can not be find.", new object[]
            {
                id
            });
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo();

            DebugHelper.Assert(masterRoleInfo != null, "roleinfo can't be null in CheckUnlock");
            if (masterRoleInfo != null && dataByKey != null)
            {
                switch (dataByKey.wUnlockType)
                {
                case 1:
                    result = (masterRoleInfo.PvpLevel >= dataByKey.UnlockParam[0]);
                    break;

                case 2:
                {
                    int             num        = (int)dataByKey.UnlockParam[0];
                    int             num2       = (int)dataByKey.UnlockParam[1];
                    int             num3       = 0;
                    ResLevelCfgInfo dataByKey2 = GameDataMgr.levelDatabin.GetDataByKey((long)num);
                    DebugHelper.Assert(dataByKey2 != null, "can't find level = {0}", new object[]
                        {
                            num
                        });
                    if (dataByKey2 != null && dataByKey2 != null && masterRoleInfo.pveLevelDetail[num3] != null && masterRoleInfo.pveLevelDetail[num3].ChapterDetailList[dataByKey2.iChapterId - 1] != null)
                    {
                        PVE_CHAPTER_COMPLETE_INFO pVE_CHAPTER_COMPLETE_INFO = masterRoleInfo.pveLevelDetail[num3].ChapterDetailList[dataByKey2.iChapterId - 1];
                        for (int i = 0; i < pVE_CHAPTER_COMPLETE_INFO.LevelDetailList.Length; i++)
                        {
                            PVE_LEVEL_COMPLETE_INFO pVE_LEVEL_COMPLETE_INFO = pVE_CHAPTER_COMPLETE_INFO.LevelDetailList[i];
                            if (pVE_LEVEL_COMPLETE_INFO != null && pVE_LEVEL_COMPLETE_INFO.iLevelID == num)
                            {
                                bool arg_178_0 = pVE_LEVEL_COMPLETE_INFO.levelStatus == 1 && num2 <= CAdventureSys.GetStarNum(pVE_LEVEL_COMPLETE_INFO.bStarBits);
                                break;
                            }
                        }
                    }
                    result = true;
                    break;
                }

                case 4:
                {
                    uint num4 = 0u;
                    if (masterRoleInfo.pvpDetail != null)
                    {
                        num4 = masterRoleInfo.pvpDetail.stOneVsOneInfo.dwTotalNum + masterRoleInfo.pvpDetail.stTwoVsTwoInfo.dwTotalNum + masterRoleInfo.pvpDetail.stThreeVsThreeInfo.dwTotalNum;
                    }
                    result = (dataByKey.UnlockParam[0] <= num4 && dataByKey.UnlockParam[1] <= masterRoleInfo.PvpLevel);
                    break;
                }
                }
            }
            return(result);
        }
Exemple #8
0
        public static void InitLevelList(CUIFormScript form, int currentChapter, int levelNo, int difficulty)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo == null)
            {
                return;
            }
            ResChapterInfo dataByKey = GameDataMgr.chapterInfoDatabin.GetDataByKey((long)currentChapter);

            DebugHelper.Assert(dataByKey != null);
            bool flag = Singleton <CFunctionUnlockSys> .instance.ChapterIsUnlock(dataByKey.dwChapterId);

            PVE_ADV_COMPLETE_INFO     pVE_ADV_COMPLETE_INFO     = masterRoleInfo.pveLevelDetail[difficulty - 1];
            PVE_CHAPTER_COMPLETE_INFO pVE_CHAPTER_COMPLETE_INFO = pVE_ADV_COMPLETE_INFO.ChapterDetailList[currentChapter - 1];

            PVE_LEVEL_COMPLETE_INFO[] levelDetailList = pVE_CHAPTER_COMPLETE_INFO.LevelDetailList;
            CUIListScript             component       = form.transform.FindChild("LevelList").GetComponent <CUIListScript>();

            component.SetElementAmount(levelDetailList.Length);
            Sprite     sprite       = CUIUtility.GetSpritePrefeb(CAdventureView.GetLevelFramePath(difficulty), false, false).GetComponent <SpriteRenderer>().sprite;
            GameObject spritePrefeb = CUIUtility.GetSpritePrefeb(CAdventureView.GetLevelSelectFramePath(difficulty), false, false);

            for (int i = 0; i < levelDetailList.Length; i++)
            {
                CUIListElementScript elemenet   = component.GetElemenet(i);
                ResLevelCfgInfo      dataByKey2 = GameDataMgr.levelDatabin.GetDataByKey((long)levelDetailList[i].iLevelID);
                DebugHelper.Assert(dataByKey2 != null, "Can't find LevelConfig = {0}", new object[]
                {
                    levelDetailList[i].iLevelID
                });
                bool flag2   = levelDetailList[i].levelStatus == 0 || !flag;
                bool bActive = levelDetailList[i].levelStatus == 1 && flag;
                int  starNum = CAdventureSys.GetStarNum(levelDetailList[i].bStarBits);
                elemenet.transform.FindChild("Unlock/star1").GetComponent <Image>().set_color((starNum >= 1) ? Color.white : CUIUtility.s_Color_GrayShader);
                elemenet.transform.FindChild("Unlock/star2").GetComponent <Image>().set_color((starNum >= 2) ? Color.white : CUIUtility.s_Color_GrayShader);
                elemenet.transform.FindChild("Unlock/star3").GetComponent <Image>().set_color((starNum >= 3) ? Color.white : CUIUtility.s_Color_GrayShader);
                elemenet.transform.FindChild("TxtLevelNameText").GetComponent <Text>().set_text(Utility.UTF8Convert(dataByKey2.szName));
                if (levelNo == i + 1 && !flag2)
                {
                    elemenet.transform.FindChild("TxtLevelNameText").GetComponent <Text>().set_color(CAdventureView.s_Adv_Level_Colors[0]);
                }
                else if (!flag2)
                {
                    elemenet.transform.FindChild("TxtLevelNameText").GetComponent <Text>().set_color(CAdventureView.s_Adv_Level_Colors[1]);
                }
                else
                {
                    elemenet.transform.FindChild("TxtLevelNameText").GetComponent <Text>().set_color(CAdventureView.s_Adv_Level_Colors[2]);
                }
                elemenet.transform.FindChild("SelectedFrame").GetComponent <Image>().set_color(CAdventureView.s_Adv_Difficult_Color[difficulty - 1]);
                elemenet.transform.FindChild("SelectedFrame/Image1").GetComponent <Image>().set_color(CAdventureView.s_Adv_Difficult_Color[CAdventureView.s_Adv_Difficult_Color.Length / 2 + difficulty - 1]);
                elemenet.transform.FindChild("SelectedFrame/Image2").GetComponent <Image>().set_color(CAdventureView.s_Adv_Difficult_Color[CAdventureView.s_Adv_Difficult_Color.Length / 2 + difficulty - 1]);
                elemenet.transform.FindChild("SelectedFrame/SelectedFrame").GetComponent <Image>().SetSprite(spritePrefeb, false);
                elemenet.transform.FindChild("New").gameObject.CustomSetActive(bActive);
                elemenet.GetComponent <CUIEventScript>().m_onClickEventID         = enUIEventID.Adv_SelectLevel;
                elemenet.GetComponent <CUIEventScript>().m_onClickEventParams.tag = i + 1;
                elemenet.transform.FindChild("Unlock").gameObject.CustomSetActive(!flag2);
                elemenet.transform.FindChild("Lock").gameObject.CustomSetActive(flag2);
                elemenet.m_selectedSprite = sprite;
                elemenet.GetComponent <Image>().SetSprite((levelNo - 1 == i) ? sprite : elemenet.m_defaultSprite, elemenet.m_selectedLayout);
            }
            component.SelectElement(levelNo - 1, true);
        }