EnergyWidgetData.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using Fort23.Core;
  2. using Fort23.UTool;
  3. using UnityEngine.UI;
  4. using UnityEngine;
  5. using TMPro;
  6. using System.Collections.Generic;
  7. namespace Fort23.Mono
  8. {
  9. public partial class EnergyWidget
  10. {
  11. #region 自定义数据
  12. private MyImage _Icon_Energy;
  13. public MyImage Icon_Energy
  14. {
  15. get{
  16. if (_Icon_Energy == null)
  17. {
  18. _Icon_Energy = GetUIUnit<MyImage>("Icon_Energy");
  19. }
  20. return _Icon_Energy;
  21. }
  22. }
  23. private TextMeshProUGUI _Text_Count;
  24. public TextMeshProUGUI Text_Count
  25. {
  26. get{
  27. if (_Text_Count == null)
  28. {
  29. _Text_Count = GetUIUnit<TextMeshProUGUI>("Text_Count");
  30. }
  31. return _Text_Count;
  32. }
  33. }
  34. private Button _Btn_Coin;
  35. public Button Btn_Coin
  36. {
  37. get{
  38. if (_Btn_Coin == null)
  39. {
  40. _Btn_Coin = GetUIUnit<Button>("Btn_Coin");
  41. }
  42. return _Btn_Coin;
  43. }
  44. }
  45. #endregion 自定义数据结束
  46. public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
  47. {
  48. await base.SetUIGameObject(gObjectPoolInterface);
  49. Init();
  50. }
  51. }
  52. }