Esempio n. 1
0
    private void OnClickBtnMulti(GameObject sender)
    {
        ChapterResume chapterResume = DungeonManager.Instance.listChapterResume.Find((ChapterResume a) => a.dungeonType == DungeonType.ENUM.Team);

        if (DungeonManager.Instance.TeamData.get_Count() == 0)
        {
            DungeonManager.Instance.SendGetDungeonDataReq(chapterResume.chapterId, chapterResume.dungeonType, delegate
            {
                this.OnClickBtnMulti(null);
            });
            return;
        }
        if (InstanceSelectUI.currentDungeonType == DungeonType.ENUM.Team)
        {
            return;
        }
        this.CacheCurrentChapterByType();
        if (this.btnChapterMultiCache != 0)
        {
            this.RefreshUI(this.btnChapterMultiCache, DungeonType.ENUM.Team);
        }
        else
        {
            ZhuXianPeiZhi zhuXianPeiZhi = DataReader <ZhuXianPeiZhi> .Get(DungeonManager.Instance.GetTheLastInstaceID(InstanceType.DungeonMutiPeople));

            this.RefreshUI(DataReader <ZhuXianZhangJiePeiZhi> .Get(zhuXianPeiZhi.chapterId).chapterOrder, DungeonType.ENUM.Team);
        }
    }
Esempio n. 2
0
 public void OnGetDungeonDataReq()
 {
     if (this.normalData.get_Count() == 0)
     {
         ChapterResume chapterResume = this.listChapterResume.Find((ChapterResume a) => a.dungeonType == DungeonType.ENUM.Normal);
     }
 }
Esempio n. 3
0
    private void OnClickBtnNormal(GameObject sender)
    {
        ChapterResume chapterResume = DungeonManager.Instance.listChapterResume.Find((ChapterResume a) => a.dungeonType == DungeonType.ENUM.Normal);

        if (DungeonManager.Instance.NormalData.get_Count() == 0)
        {
            DungeonManager.Instance.SendGetDungeonDataReq(chapterResume.chapterId, chapterResume.dungeonType, delegate
            {
                this.OnClickBtnNormal(null);
            });
            return;
        }
        if (InstanceSelectUI.currentDungeonType == DungeonType.ENUM.Normal)
        {
            return;
        }
        this.CacheCurrentChapterByType();
        if (this.btnChapterNormalCache != 0)
        {
            this.RefreshUI(this.btnChapterNormalCache, DungeonType.ENUM.Normal);
        }
        else
        {
            ZhuXianPeiZhi zhuXianPeiZhi = DataReader <ZhuXianPeiZhi> .Get(DungeonManager.Instance.GetTheLastInstaceID(InstanceType.DungeonNormal));

            this.RefreshUI(DataReader <ZhuXianZhangJiePeiZhi> .Get(zhuXianPeiZhi.chapterId).chapterOrder, DungeonType.ENUM.Normal);
        }
        UIManagerControl.Instance.HideUI("EliteDungeonUI");
    }
    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);
    }
Esempio n. 5
0
    public void SendGetDungeonDataReq(int chapterId, DungeonType.ENUM type, Action actionGetDungeonDataCallback)
    {
        if (this.isRequestingChapters)
        {
            return;
        }
        this.m_actionGetDungeonDataCallback = actionGetDungeonDataCallback;
        this.isRequestingChapters           = true;
        ChapterResume chapterResume = new ChapterResume();

        chapterResume.chapterId   = chapterId;
        chapterResume.dungeonType = type;
        NetworkManager.Send(new GetDungeonDataReq
        {
            chaterInfo = chapterResume
        }, ServerType.Data);
    }
Esempio n. 6
0
 private void RequestDungeonDataLogin()
 {
     if (this.NormalData.get_Count() > 0)
     {
         return;
     }
     if (this.EliteData.get_Count() > 0)
     {
         return;
     }
     if (this.TeamData.get_Count() > 0)
     {
         return;
     }
     for (int i = 0; i < this.listChapterResume.get_Count(); i++)
     {
         ChapterResume chapterResume = this.listChapterResume.get_Item(i);
         this.SendGetDungeonDataReq(chapterResume.chapterId, chapterResume.dungeonType, null);
     }
 }
    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);
    }