MainUIPanelData.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. using Fort23.Core;
  2. using Fort23.UTool;
  3. using UnityEngine.UI;
  4. using UnityEngine;
  5. using System.Collections.Generic;
  6. using TMPro;
  7. namespace Fort23.Mono
  8. {
  9. public partial class MainUIPanel
  10. {
  11. #region 自定义数据
  12. private List<object> _hero_battle;
  13. public List<object> hero_battle
  14. {
  15. get{
  16. if (_hero_battle == null)
  17. {
  18. _hero_battle = GetUIUnit<List<object>>("hero_battle");
  19. }
  20. return _hero_battle;
  21. }
  22. }
  23. private RectTransform _herobag;
  24. public RectTransform herobag
  25. {
  26. get{
  27. if (_herobag == null)
  28. {
  29. _herobag = GetUIUnit<RectTransform>("herobag");
  30. }
  31. return _herobag;
  32. }
  33. }
  34. private RectTransform _Icon_Coin;
  35. public RectTransform Icon_Coin
  36. {
  37. get{
  38. if (_Icon_Coin == null)
  39. {
  40. _Icon_Coin = GetUIUnit<RectTransform>("Icon_Coin");
  41. }
  42. return _Icon_Coin;
  43. }
  44. }
  45. private RectTransform _expPoint;
  46. public RectTransform expPoint
  47. {
  48. get{
  49. if (_expPoint == null)
  50. {
  51. _expPoint = GetUIUnit<RectTransform>("expPoint");
  52. }
  53. return _expPoint;
  54. }
  55. }
  56. private Slider _exp;
  57. public Slider exp
  58. {
  59. get{
  60. if (_exp == null)
  61. {
  62. _exp = GetUIUnit<Slider>("exp");
  63. }
  64. return _exp;
  65. }
  66. }
  67. private TextMeshProUGUI _TextExp;
  68. public TextMeshProUGUI TextExp
  69. {
  70. get{
  71. if (_TextExp == null)
  72. {
  73. _TextExp = GetUIUnit<TextMeshProUGUI>("TextExp");
  74. }
  75. return _TextExp;
  76. }
  77. }
  78. private TextMeshProUGUI _txtCoin;
  79. public TextMeshProUGUI txtCoin
  80. {
  81. get{
  82. if (_txtCoin == null)
  83. {
  84. _txtCoin = GetUIUnit<TextMeshProUGUI>("txtCoin");
  85. }
  86. return _txtCoin;
  87. }
  88. }
  89. private TextMeshProUGUI _txtDiamond;
  90. public TextMeshProUGUI txtDiamond
  91. {
  92. get{
  93. if (_txtDiamond == null)
  94. {
  95. _txtDiamond = GetUIUnit<TextMeshProUGUI>("txtDiamond");
  96. }
  97. return _txtDiamond;
  98. }
  99. }
  100. private TextMeshProUGUI _txtHeroExp;
  101. public TextMeshProUGUI txtHeroExp
  102. {
  103. get{
  104. if (_txtHeroExp == null)
  105. {
  106. _txtHeroExp = GetUIUnit<TextMeshProUGUI>("txtHeroExp");
  107. }
  108. return _txtHeroExp;
  109. }
  110. }
  111. #endregion 自定义数据结束
  112. public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
  113. {
  114. await base.SetUIGameObject(gObjectPoolInterface);
  115. Init();
  116. }
  117. }
  118. }