Esempio n. 1
0
    /// <summary>
    /// 初始化Item
    /// </summary>
    /// <param name="con"></param>
    public void InitUIByConfig(GameGoldPatternConfigConfig con)
    {
        mConfig = con;
        Assets.LoadTexture(mConfig.icon, (t) =>
        {
            mBg.mainTexture = t;
        });

        mLv.text = con.lvName;
        //底分
        mBaseScore.text        = con.baseScore.ToString();
        mBaseScore.effectColor = NGUIText.ParseColor(con.effectColor, 0);
        mLimit.text            = con.minStr;
        mLimit_shadow.text     = con.minStr;
        mLimit.effectColor     = mBaseScore.effectColor;
        if (!string.IsNullOrEmpty(con.tittle))
        {
            mTipsRoot.gameObject.SetActive(true);
            mTips.text = con.tittle;
        }
        else
        {
            mTipsRoot.gameObject.SetActive(false);
        }
    }
Esempio n. 2
0
    private GameGoldPatternConfigConfig mData; //数据


    //设置数据
    public void SetData(GameGoldPatternConfigConfig data, int num)
    {
        mData = data;
        //标题
        mTittle.spriteName = data.icon;
        //最低金币
        mCoin.text = data.minFore.ToString() + "金币入局";
        //底分
        mBaseScore.text = data.baseScore.ToString();
        //人数
        if (num < 3)
        {
            mPlayerNum.text = num.ToString();
        }
        else
        {
            mPlayerNum.text = (num * 3 - 2).ToString();
        }
    }