Ejemplo n.º 1
0
    public static void OpenInstanceSelectUI(int instanceID, bool hideTheVisible = true, UIType type = UIType.FullScreen)
    {
        ZhuXianPeiZhi zhuXianPeiZhi = DataReader <ZhuXianPeiZhi> .Get(instanceID);

        int chapterId = zhuXianPeiZhi.chapterId;
        ZhuXianZhangJiePeiZhi datazj = DataReader <ZhuXianZhangJiePeiZhi> .Get(chapterId);

        ChapterResume      chapterResume      = DungeonManager.Instance.listChapterResume.Find((ChapterResume a) => a.dungeonType == (DungeonType.ENUM)datazj.chapterType);
        List <ChapterInfo> dataByInstanceType = DungeonManager.Instance.GetDataByInstanceType(datazj.chapterType);

        if (dataByInstanceType.get_Count() == 0)
        {
            DungeonManager.Instance.SendGetDungeonDataReq(chapterResume.chapterId, chapterResume.dungeonType, delegate
            {
                InstanceManagerUI.OpenInstanceSelectUI(instanceID, hideTheVisible, type);
            });
            return;
        }
        InstanceManagerUI.LastOpenInstanceID = instanceID;
        InstanceSelectUI instanceSelectUI = UIManagerControl.Instance.OpenUI("InstanceSelectUI", null, true, UIType.FullScreen) as InstanceSelectUI;

        instanceSelectUI.RefreshUIByInstanceID(InstanceManagerUI.LastOpenInstanceID);
    }