Пример #1
0
    /// <summary>
    /// 打开倒计时UI
    /// </summary>
    /// <param name="miniGameData"></param>
    public void OpenCountDownUI(MiniGameBaseBean miniGameData, bool isCountDown)
    {
        //打开游戏准备倒计时UI
        UIMiniGameCountDown uiCountDown = UIHandler.Instance.manager.OpenUIAndCloseOther <UIMiniGameCountDown>(UIEnum.MiniGameCountDown);

        uiCountDown.SetCallBack(this);
        //设置胜利条件
        List <string> listWinConditions = miniGameData.GetListWinConditions();
        string        targetTitleStr    = miniGameData.GetGameName();

        //设置准备UI的数据
        uiCountDown.SetData(targetTitleStr, listWinConditions, isCountDown);
    }
Пример #2
0
    /// <summary>
    /// 设置标题
    /// </summary>
    /// <param name="title"></param>
    public void SetTitle(MiniGameBaseBean miniGameData)
    {
        string title = "";

        if (miniGameData.gameType == MiniGameEnum.Combat)
        {
            if (miniGameData.winBringDownNumber == 1)
            {
                title = miniGameData.GetGameName() + "(" + TextHandler.Instance.manager.GetTextById(92) + ")";
            }
            else
            {
                title = miniGameData.GetGameName() + "(" + string.Format(TextHandler.Instance.manager.GetTextById(91), miniGameData.winBringDownNumber) + ")";
            }
        }
        else
        {
            title = miniGameData.GetGameName();
        }
        if (tvTitle != null)
        {
            tvTitle.text = title;
        }
    }