Ejemplo n.º 1
0
    /// <summary>
    /// 开启通用弹窗;
    /// </summary>
    /// <param name="title"></param>
    /// <param name="detail"></param>
    /// <param name="hint"></param>
    /// <param name="yesBtnTxt"></param>
    /// <param name="yesAction"></param>
    /// <param name="param"></param>
    /// <returns></returns>
    public UICommon_MsgBox ShowMsgBox(string title, string detail, string hint = "", string yesBtnTxt = "", UnityAction <object> yesAction = null, UnityAction <object> noAction = null, object param = null)
    {
        UICommon_MsgBox msgBox = UICommonFactory.GenerateUICommon(UICommonType.CommonMsgBox) as UICommon_MsgBox;

        if (msgBox != null)
        {
            msgBox.SetData(title, detail, hint, yesBtnTxt, yesAction, noAction, param);
        }

        return(msgBox);
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 英雄属性;
    /// </summary>
    /// <param name="objectCreature"></param>
    /// <returns></returns>
    public UICommon_HeroProp ShowHeroProp(ObjectCreature objectCreature)
    {
        UICommon_HeroProp commonUI = UICommonFactory.GenerateUICommon(UICommonType.CommonHeroProp) as UICommon_HeroProp;

        if (commonUI != null)
        {
            commonUI.SetData(objectCreature);
        }

        return(commonUI);
    }
Ejemplo n.º 3
0
    /// <summary>
    /// 英雄信息弹窗;
    /// </summary>
    /// <param name="objectCard"></param>
    /// <returns></returns>
    public UICommon_Hero ShowHero(ObjectCard objectCard)
    {
        UICommon_Hero commonUI = UICommonFactory.GenerateUICommon(UICommonType.CommonHero) as UICommon_Hero;

        if (commonUI != null)
        {
            commonUI.SetData(objectCard);
        }

        return(commonUI);
    }
Ejemplo n.º 4
0
    /// <summary>
    /// 获得奖励弹窗;
    /// </summary>
    /// <param name="dropId"></param>
    /// <returns></returns>
    public UICommon_RewardView ShowRewardView(int dropId)
    {
        if (!IsIdValide(dropId))
        {
            return(null);
        }
        UICommon_RewardView commonUI = UICommonFactory.GenerateUICommon(UICommonType.CommonRewardView) as UICommon_RewardView;

        if (commonUI != null)
        {
            commonUI.SetData(dropId);
        }

        return(commonUI);
    }
Ejemplo n.º 5
0
    /// <summary>
    /// 宝箱预览通用弹窗;
    /// </summary>
    /// <param name="dropId"></param>
    /// <returns></returns>
    public UICommon_RewardBox ShowRewardBox(int dropId, int starNum)
    {
        if (!IsIdValide(dropId))
        {
            return(null);
        }
        UICommon_RewardBox commonUI = UICommonFactory.GenerateUICommon(UICommonType.CommonRewardBox) as UICommon_RewardBox;

        if (commonUI != null)
        {
            commonUI.SetData(dropId, starNum);
        }

        return(commonUI);
    }
Ejemplo n.º 6
0
    /// <summary>
    /// 物品获得途径的通用弹窗;
    /// </summary>
    /// <param name="itemId"></param>
    /// <returns></returns>
    public UICommon_Obtain ShowHeroObtain(int itemId)
    {
        if (!IsIdValide(itemId))
        {
            return(null);
        }
        UICommon_Obtain commonUI = UICommonFactory.GenerateUICommon(UICommonType.CommonObtain) as UICommon_Obtain;

        if (commonUI != null)
        {
            commonUI.SetData(itemId);
        }

        return(commonUI);
    }
Ejemplo n.º 7
0
    /// <summary>
    /// 神魂通用UI;
    /// </summary>
    /// <param name="tableId"></param>
    /// <returns></returns>
    public UICommon_GodSoul ShowGodSoul(int tableId)
    {
        if (!IsIdValide(tableId))
        {
            return(null);
        }
        UICommon_GodSoul commonUI = UICommonFactory.GenerateUICommon(UICommonType.CommonGodSoul) as UICommon_GodSoul;

        if (commonUI != null)
        {
            commonUI.SetData(tableId);
        }

        return(commonUI);
    }
Ejemplo n.º 8
0
    /// <summary>
    /// 通用弹窗接口,物品(不带获得途径的)、怪物....
    /// </summary>
    /// <param name="tableId"></param>
    /// <returns></returns>
    public UICommon_Common ShowCommon(int tableId)
    {
        if (!IsIdValide(tableId))
        {
            return(null);
        }
        UICommon_Common commonUI = UICommonFactory.GenerateUICommon(UICommonType.Common) as UICommon_Common;

        if (commonUI != null)
        {
            commonUI.SetData(tableId);
        }

        return(commonUI);
    }