Пример #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
 private void OnClickBtnBackpack(GameObject sender)
 {
     InstanceManagerUI.OpenInstanceUI(10101, false, UIType.FullScreen);
 }
Пример #3
0
    public static void GoTo(int pathId)
    {
        DLuJingShuXing dLuJingShuXing = DataReader <DLuJingShuXing> .Get(pathId);

        if (dLuJingShuXing.type == 0 && !UIManagerControl.Instance.IsOpen("InstanceDetailUI"))
        {
            int       instanceID = (int)float.Parse(dLuJingShuXing.invokeParam);
            Hashtable hashtable  = DungeonManager.Instance.CheckLock(instanceID);
            bool      flag       = (bool)hashtable.get_Item("ISLock");
            string    text       = (string)hashtable.get_Item("LockReason");
            if (flag)
            {
                UIManagerControl.Instance.ShowToastText(text);
                return;
            }
            InstanceManagerUI.OpenInstanceUI(instanceID, false, UIType.FullScreen);
        }
        else if (dLuJingShuXing.type == 1 && !UIManagerControl.Instance.IsOpen("SurvivalChallengeUI"))
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            LinkNavigationManager.OpenSurvivalChallengeUI();
        }
        else if (dLuJingShuXing.type == 2 && !UIManagerControl.Instance.IsOpen("PVPUI"))
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            LinkNavigationManager.OpenPVPUI();
        }
        else if (dLuJingShuXing.type == 3 && !UIManagerControl.Instance.IsOpen("GangFightUI"))
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            UIManagerControl.Instance.OpenUI("GangFightUI", null, false, UIType.FullScreen);
        }
        else if (dLuJingShuXing.type == 4 && !UIManagerControl.Instance.IsOpen("ElementInstanceUI"))
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            UIManagerControl.Instance.OpenUI("ElementInstanceUI", null, false, UIType.FullScreen);
        }
        else if (dLuJingShuXing.type == 5 && !UIManagerControl.Instance.IsOpen("SpecialInstanceUI"))
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            InstanceManagerUI.OpenSpecialInstanceUI();
        }
        else if (dLuJingShuXing.type == 6 && !UIManagerControl.Instance.IsOpen("ShoppingUI"))
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            MarketManager.Instance.OpenShop(3);
        }
        else if (dLuJingShuXing.type == 7 && !UIManagerControl.Instance.IsOpen("LuckDrawUI"))
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            UIManagerControl.Instance.OpenUI("LuckDrawUI", null, true, UIType.FullScreen);
        }
        else if (dLuJingShuXing.type == 8 && !UIManagerControl.Instance.IsOpen("EveryDayUI"))
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            UIManagerControl.Instance.OpenUI("DailyTaskUI", null, true, UIType.FullScreen);
        }
        else if (dLuJingShuXing.type == 9)
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            LinkNavigationManager.OpenPetUI(null);
        }
        else if (dLuJingShuXing.type == 10)
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            LinkNavigationManager.OpenEquipGemUI(EquipLibType.ELT.Weapon, null);
        }
        else if (dLuJingShuXing.type == 11)
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            LinkNavigationManager.OpenActorUI(null);
        }
        else if (dLuJingShuXing.type == 12)
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
        }
        else if (dLuJingShuXing.type == 13)
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            UIManagerControl.Instance.OpenUI("RiseUI", null, true, UIType.FullScreen);
        }
        else if (dLuJingShuXing.type == 14)
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            LinkNavigationManager.OpenVIPUI2Recharge();
        }
        else if (dLuJingShuXing.type == 15)
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            CurrenciesUIViewModel.Instance.OnClickGold();
        }
        else if (dLuJingShuXing.type == 16)
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
        }
        else if (dLuJingShuXing.type == 17)
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            InstanceManagerUI.OpenEliteDungeonUI();
        }
        else if (dLuJingShuXing.type == 18)
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
        }
        else if (dLuJingShuXing.type == 19)
        {
            if (!SystemOpenManager.IsSystemClickOpen(37, 0, true))
            {
                return;
            }
            LinkNavigationManager.OpenEquipStarUpUI(EquipLibType.ELT.Weapon, null);
        }
        else if (dLuJingShuXing.type == 20)
        {
            LinkNavigationManager.OpenEquipStrengthenUI(EquipLibType.ELT.Weapon, null);
        }
        else if (dLuJingShuXing.type == 21)
        {
            if (!SystemOpenManager.IsSystemClickOpen(dLuJingShuXing.systemOpenID, 502255, true))
            {
                return;
            }
            LinkNavigationManager.OpenEquipGemUI(EquipLibType.ELT.Weapon, null);
        }
        else if (dLuJingShuXing.type == 22)
        {
            LinkNavigationManager.OpenSkillUI(null);
        }
        else if (dLuJingShuXing.type == 23)
        {
            LinkNavigationManager.OpenPetLevelUI();
        }
        else if (dLuJingShuXing.type == 24)
        {
            LinkNavigationManager.OpenPetStarUI();
        }
        else if (dLuJingShuXing.type == 25)
        {
            LinkNavigationManager.OpenPetSkillUI();
        }
        else if (dLuJingShuXing.type == 28)
        {
            if (!SystemOpenManager.IsSystemClickOpen(27, 0, true))
            {
                return;
            }
            InstanceManagerUI.OpenBountyUI();
        }
        else if (dLuJingShuXing.type == 29)
        {
            if (!SystemOpenManager.IsSystemClickOpen(41, 0, true))
            {
                return;
            }
        }
        else
        {
            Debug.LogError("错误的索引ID  " + pathId);
        }
        if (SourceReferenceUI.m_actionClickGoToItem != null)
        {
            SourceReferenceUI.m_actionClickGoToItem.Invoke();
            SourceReferenceUI.m_actionClickGoToItem = null;
        }
    }
 public void OnChannelBtnUp()
 {
     AccessChannelUIViewModel.Instance.OnCloseBtnUp();
     InstanceManagerUI.OpenInstanceUI(this.InstanceId, false, UIType.FullScreen);
 }