public void UpdateUI() { CommonTool.SetActive(gameObject, mMoneyType > 0); if (mMoneyType > 0) { if (mValueText != null) { uint money = LocalPlayerManager.Instance.GetMoneyByConst((ushort)mMoneyType); mValueText.text = UIWidgetHelp.GetLargeNumberString3(money, mDecimalPlaces); } if (mIconImage != null && mCanvasInfo != null) { var name = LocalPlayerManager.GetMoneySpriteName(mMoneyType); mIconImage.sprite = mCanvasInfo.LoadSprite(name); } } }
public void Update() { uint money = LocalPlayerManager.Instance.GetMoneyByConst((ushort)mMoneyType); //if (money <= 99999) //{ // mValueText.text = string.Format("{0}", money); //} //else //{ // money = money / 10000; // mValueText.text = string.Format("{0}万", money); //} mValueText.text = UIWidgetHelp.GetLargeNumberString3(money); var name = LocalPlayerManager.GetMoneySpriteName(mMoneyType); mIconImage.sprite = mCanvasInfo.LoadSprite(name); }