Esempio n. 1
0
    public void JumpTownView(UI.MainUI.UIType viewType, int linkChildView)
    {
        switch (viewType)
        {
        case UI.MainUI.UIType.Gem:
        {
            if (linkChildView == 1)
            {
                UI.MainUI.MainUIController.Instance.OpenMainUI(viewType);
            }
            else if (linkChildView == 2)
            {
                UI.MainUI.MainUIController.Instance.OpenMainUI(viewType, JewelState.JewelUpgrad);
            }
        }
        break;

        case UI.MainUI.UIType.Activity:
        case UI.MainUI.UIType.Siren:
        {
            UI.MainUI.MainUIController.Instance.OpenMainUI(viewType, linkChildView);
        }
        break;

        case UI.MainUI.UIType.EquipmentUpgrade:
        {
            if (linkChildView == 1)
            {
                UI.MainUI.MainUIController.Instance.OpenMainUI(viewType, UpgradeType.Strength);
            }
            else if (linkChildView == 2)
            {
                UI.MainUI.MainUIController.Instance.OpenMainUI(viewType, UpgradeType.StarUp);
            }
            else
            {
                UI.MainUI.MainUIController.Instance.OpenMainUI(viewType, UpgradeType.Upgrade);
            }
        }
        break;

        case UI.MainUI.UIType.Forging:
        {
            if (linkChildView == 0)
            {
                UI.MainUI.MainUIController.Instance.OpenMainUI(viewType);
            }
            else
            {
                UI.MainUI.MainUIController.Instance.OpenMainUI(viewType, linkChildView);
            }
        }
        break;

        default:
            UI.MainUI.MainUIController.Instance.OpenMainUI(viewType);
            break;
        }
    }
Esempio n. 2
0
    public void JumpView(LinkConfigItemData itemData)
    {
        switch (itemData.LinkType)
        {
        case LinkType.Battle:
            if (EctypeModel.Instance.IsOpenEctype(int.Parse(itemData.LinkPara)))
            {
                EctypeModel.Instance.OpenPointToEctypePanel(int.Parse(itemData.LinkPara));
            }
            else
            {
                return;
            }
            break;

        case LinkType.NoneLink:
            return;

        case LinkType.SystemFun:
            UI.MainUI.UIType type = (UI.MainUI.UIType)System.Convert.ToInt32(itemData.LinkPara);
            if (IsOpenSysFun(type))
            {
                //MainUIController.Instance.OpenMainUI(type);
                JumpTownView(type, itemData.LinkChildren);
            }
            else
            {
                return;
            }
            break;

        case LinkType.CrusadeBattle:
            if (EctypeManager.Instance.IsCrusadeEctypeUnlock(int.Parse(itemData.LinkPara)))
            {
                UI.MainUI.MainUIController.Instance.OpenMainUI(UI.MainUI.UIType.Crusade, int.Parse(itemData.LinkPara));
            }
            else
            {
                return;
            }
            break;

        case LinkType.DefenseBattle:
            if (DefenceEntryManager.DefenceEctypeEnabled(int.Parse(itemData.LinkPara)))
            {
                UI.MainUI.MainUIController.Instance.OpenMainUI(UI.MainUI.UIType.Defence, int.Parse(itemData.LinkPara));
            }
            else
            {
                return;
            }
            break;
        }
    }
Esempio n. 3
0
    public bool IsOpenSysFun(UI.MainUI.UIType btnType)
    {
        bool Contain = false;

        UIType[] uiType = NewUIDataManager.Instance.InitMainButtonList.Single(P => P.ButtonProgress == GameManager.Instance.MainButtonIndex).MainButtonList;

        if (uiType.LocalContains(btnType))
        {
            Contain = true;
        }
        return(Contain);
    }