MainUIPanelData.cs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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 _txtCoin;
  134. public TextMeshProUGUI txtCoin
  135. {
  136. get{
  137. if (_txtCoin == null)
  138. {
  139. _txtCoin = GetUIUnit<TextMeshProUGUI>("txtCoin");
  140. }
  141. return _txtCoin;
  142. }
  143. }
  144. private TextMeshProUGUI _txtDiamond;
  145. public TextMeshProUGUI txtDiamond
  146. {
  147. get{
  148. if (_txtDiamond == null)
  149. {
  150. _txtDiamond = GetUIUnit<TextMeshProUGUI>("txtDiamond");
  151. }
  152. return _txtDiamond;
  153. }
  154. }
  155. private TextMeshProUGUI _txtHeroExp;
  156. public TextMeshProUGUI txtHeroExp
  157. {
  158. get{
  159. if (_txtHeroExp == null)
  160. {
  161. _txtHeroExp = GetUIUnit<TextMeshProUGUI>("txtHeroExp");
  162. }
  163. return _txtHeroExp;
  164. }
  165. }
  166. private GameObject _fx_ui_coin;
  167. public GameObject fx_ui_coin
  168. {
  169. get{
  170. if (_fx_ui_coin == null)
  171. {
  172. _fx_ui_coin = GetUIUnit<GameObject>("fx_ui_coin");
  173. }
  174. return _fx_ui_coin;
  175. }
  176. }
  177. private GameObject _fx_ui_exp;
  178. public GameObject fx_ui_exp
  179. {
  180. get{
  181. if (_fx_ui_exp == null)
  182. {
  183. _fx_ui_exp = GetUIUnit<GameObject>("fx_ui_exp");
  184. }
  185. return _fx_ui_exp;
  186. }
  187. }
  188. private TextMeshProUGUI _levelName;
  189. public TextMeshProUGUI levelName
  190. {
  191. get{
  192. if (_levelName == null)
  193. {
  194. _levelName = GetUIUnit<TextMeshProUGUI>("levelName");
  195. }
  196. return _levelName;
  197. }
  198. }
  199. private Button _btnHeroBag;
  200. public Button btnHeroBag
  201. {
  202. get{
  203. if (_btnHeroBag == null)
  204. {
  205. _btnHeroBag = GetUIUnit<Button>("btnHeroBag");
  206. }
  207. return _btnHeroBag;
  208. }
  209. }
  210. private Button _Button_battleBoss;
  211. public Button Button_battleBoss
  212. {
  213. get{
  214. if (_Button_battleBoss == null)
  215. {
  216. _Button_battleBoss = GetUIUnit<Button>("Button_battleBoss");
  217. }
  218. return _Button_battleBoss;
  219. }
  220. }
  221. private MyImage _Icon_HeroExp;
  222. public MyImage Icon_HeroExp
  223. {
  224. get{
  225. if (_Icon_HeroExp == null)
  226. {
  227. _Icon_HeroExp = GetUIUnit<MyImage>("Icon_HeroExp");
  228. }
  229. return _Icon_HeroExp;
  230. }
  231. }
  232. #endregion 自定义数据结束
  233. public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
  234. {
  235. await base.SetUIGameObject(gObjectPoolInterface);
  236. Init();
  237. }
  238. }
  239. }