Beispiel #1
0
    public static void PropsacessHandler(int type, int data)
    {
        switch (type)
        {
        case 1:                 //副本;
            UI_HomeControler.Inst.RemoveAllUIButThis(new string[] { UI_MainHome.UI_ResPath });

            UI_SelectLevelMgrNew.InitLevelId = data;
            UI_HomeControler.Inst.AddUI(UI_SelectLevelMgrNew.UI_ResPath);
            UI_HomeControler.Inst.AddUI(UI_Stage.UI_Res);
            StageTemplate stageT = StageModule.GetStageTemplateById(data);
            UI_Stage.Inst.Show(stageT);
            break;

        case 2:                 //66表--界面跳转表id;
            PropsjumpuiTemplate jumpUiT = DataTemplate.GetInstance().m_PropsacessTable.getTableData(data) as PropsjumpuiTemplate;
            if (jumpUiT != null)
            {
                UI_HomeControler.Inst.AddUI(jumpUiT.getJumpUIpath());
            }
            break;

        default:
            LogManager.LogError("不支持的获得途径类型" + type);
            break;
        }
    }
    /// <summary>
    /// 跳转界面
    /// </summary>
    void JumpUI()
    {
        ObjectCard heroCard = ObjectSelf.GetInstance().HeroContainerBag.FindHero(((ItemFragment)baseIrem).GetComposeHeoid());

        if (heroCard == null)
        {
            InterfaceControler.GetInst().AddMsgBox("尚未获得此英雄");
            return;
        }
        ItemTemplate        _item  = (ItemTemplate)DataTemplate.GetInstance().m_ItemTable.getTableData(baseIrem.GetItemTableID());
        PropsjumpuiTemplate _jump  = (PropsjumpuiTemplate)DataTemplate.GetInstance().m_PropsjumpuiTable.getTableData(_item.getUsejumpType());
        HeroStrengthen      _panel = UI_HomeControler.Inst.AddUI(_jump.getJumpUIpath()).GetComponent <HeroStrengthen>();

        if (_panel != null)
        {
            Debug.Log("打开品质提升界面");
            _panel.OnClickHeroIcon(heroCard);
            _panel.ClickSwitchBtn("UI_QualityProUI", 1);
        }
        else
        {
            Debug.LogError("加载界面失败:" + _jump.getJumpUIpath());
        }
    }