MainUIPanelData.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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 _coinText;
  79. public TextMeshProUGUI coinText
  80. {
  81. get{
  82. if (_coinText == null)
  83. {
  84. _coinText = GetUIUnit<TextMeshProUGUI>("coinText");
  85. }
  86. return _coinText;
  87. }
  88. }
  89. private GameObject _Slider_Exp_Process;
  90. public GameObject Slider_Exp_Process
  91. {
  92. get{
  93. if (_Slider_Exp_Process == null)
  94. {
  95. _Slider_Exp_Process = GetUIUnit<GameObject>("Slider_Exp_Process");
  96. }
  97. return _Slider_Exp_Process;
  98. }
  99. }
  100. private GameObject _bossHp;
  101. public GameObject bossHp
  102. {
  103. get{
  104. if (_bossHp == null)
  105. {
  106. _bossHp = GetUIUnit<GameObject>("bossHp");
  107. }
  108. return _bossHp;
  109. }
  110. }
  111. private Slider _Slider_Hp_Boss;
  112. public Slider Slider_Hp_Boss
  113. {
  114. get{
  115. if (_Slider_Hp_Boss == null)
  116. {
  117. _Slider_Hp_Boss = GetUIUnit<Slider>("Slider_Hp_Boss");
  118. }
  119. return _Slider_Hp_Boss;
  120. }
  121. }
  122. private Text _bossName;
  123. public Text bossName
  124. {
  125. get{
  126. if (_bossName == null)
  127. {
  128. _bossName = GetUIUnit<Text>("bossName");
  129. }
  130. return _bossName;
  131. }
  132. }
  133. private TextMeshProUGUI _bossHpText;
  134. public TextMeshProUGUI bossHpText
  135. {
  136. get{
  137. if (_bossHpText == null)
  138. {
  139. _bossHpText = GetUIUnit<TextMeshProUGUI>("bossHpText");
  140. }
  141. return _bossHpText;
  142. }
  143. }
  144. #endregion 自定义数据结束
  145. public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
  146. {
  147. await base.SetUIGameObject(gObjectPoolInterface);
  148. Init();
  149. }
  150. }
  151. }