Beispiel #1
0
    private void UpdateVipExp()
    {
        int exp         = objectSelf.VipExp;
        var vipTemplate = (VipTemplate)m_VipReader.getTableData(objectSelf.VipLevel);
        int maxExp      = vipTemplate.getVipExp();

        if (maxExp > 0)
        {
            m_ExpSlider.value = (float)exp / maxExp;
            int money = ShopModule.GetMoneyCountToNextVipLv(objectSelf.VipLevel, exp);
            System.Text.StringBuilder builder = new System.Text.StringBuilder(string.Format(m_TopDescriptionTextTempString, money));
            builder.AppendFormat("<color=#ECAF48>VIP{0}</color>", (objectSelf.VipLevel + 1));
//            builder.Append((objectSelf.VipLevel+1).ToString());
            m_TopDescriptionText.text = builder.ToString();
            m_VipExpText.text         = string.Format("/{0}", maxExp);
            m_CurrentExpText.text     = exp.ToString();
        }
        else
        {
            m_TopDescriptionText.text = GameUtils.getString("VIP_tips1");;
            m_ExpSlider.gameObject.SetActive(false);
            m_VipExpText.gameObject.SetActive(false);
        }
    }