UIMoneyController.cs 448 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using UnityEngine;
  3. public class UIMoneyController : MonoBehaviour
  4. {
  5. public int CoinNum
  6. {
  7. get
  8. {
  9. return this._coinNum;
  10. }
  11. set
  12. {
  13. if (this._coinNum != value)
  14. {
  15. this._coinNum = value;
  16. this.moneyLabel.text = value.ToString();
  17. }
  18. }
  19. }
  20. private void Update()
  21. {
  22. this.CoinNum = R.Equipment.CoinNum;
  23. }
  24. private int _coinNum;
  25. [SerializeField]
  26. private UILabel moneyLabel;
  27. }