예제 #1
0
    public static void OpenInstanceUI(int instanceID, bool hideTheVisible = false, UIType type = UIType.FullScreen)
    {
        InstanceManagerUI.InstanceID = instanceID;
        ZhuXianPeiZhi zhuXianPeiZhi = DataReader <ZhuXianPeiZhi> .Get(instanceID);

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

        List <ChapterInfo> dataByInstanceType = DungeonManager.Instance.GetDataByInstanceType(zhuXianZhangJiePeiZhi.chapterType);

        if (dataByInstanceType.get_Count() == 0 || dataByInstanceType.Find((ChapterInfo a) => a.chapterId == chapterID) == null)
        {
            DungeonManager.Instance.SendGetDungeonDataReq(chapterID, (DungeonType.ENUM)zhuXianZhangJiePeiZhi.chapterType, delegate
            {
                InstanceManagerUI.OpenInstanceUI(instanceID, hideTheVisible, type);
            });
            return;
        }
        FuBenJiChuPeiZhi fuBenJiChuPeiZhi = DataReader <FuBenJiChuPeiZhi> .Get(instanceID);

        if (fuBenJiChuPeiZhi.type == 103)
        {
            InstanceSelectUI instanceSelectUI = UIManagerControl.Instance.OpenUI("InstanceSelectUI", null, true, UIType.FullScreen) as InstanceSelectUI;
            instanceSelectUI.RefreshUIByInstanceID(instanceID);
        }
        else
        {
            InstanceSelectUI instanceSelectUI2 = UIManagerControl.Instance.OpenUI("InstanceSelectUI", null, true, UIType.FullScreen) as InstanceSelectUI;
            instanceSelectUI2.RefreshUIByInstanceID(instanceID);
            InstanceDetailUI instanceDetailUI = UIManagerControl.Instance.OpenUI("InstanceDetailUI", null, false, UIType.Pop) as InstanceDetailUI;
            instanceDetailUI.RefreshUI(instanceID);
        }
    }
예제 #2
0
    public static void OpenTheLastInstanceSelectUI(InstanceType instanceType)
    {
        ChapterResume      chapterResume      = DungeonManager.Instance.listChapterResume.Find((ChapterResume a) => a.dungeonType == (DungeonType.ENUM)instanceType);
        List <ChapterInfo> dataByInstanceType = DungeonManager.Instance.GetDataByInstanceType((int)instanceType);

        if (dataByInstanceType.get_Count() == 0)
        {
            return;
        }
        InstanceManagerUI.LastOpenInstanceID = DungeonManager.Instance.GetTheLastInstaceID(instanceType);
        InstanceSelectUI instanceSelectUI = UIManagerControl.Instance.OpenUI("InstanceSelectUI", null, true, UIType.FullScreen) as InstanceSelectUI;

        instanceSelectUI.RefreshUIByInstanceID(InstanceManagerUI.LastOpenInstanceID);
    }
예제 #3
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);
    }