MainUIPanelData.cs 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. using Fort23.Core;
  2. using Fort23.UTool;
  3. using UnityEngine.UI;
  4. using UnityEngine;
  5. using System.Collections.Generic;
  6. using Core.UI.UTool.UITween;
  7. using TMPro;
  8. namespace Fort23.Mono
  9. {
  10. public partial class MainUIPanel
  11. {
  12. #region 自定义数据
  13. private List<object> _hero_battle;
  14. public List<object> hero_battle
  15. {
  16. get{
  17. if (_hero_battle == null)
  18. {
  19. _hero_battle = GetUIUnit<List<object>>("hero_battle");
  20. }
  21. return _hero_battle;
  22. }
  23. }
  24. private RectTransform _herobag;
  25. public RectTransform herobag
  26. {
  27. get{
  28. if (_herobag == null)
  29. {
  30. _herobag = GetUIUnit<RectTransform>("herobag");
  31. }
  32. return _herobag;
  33. }
  34. }
  35. private RectTransform _Icon_Coin;
  36. public RectTransform Icon_Coin
  37. {
  38. get{
  39. if (_Icon_Coin == null)
  40. {
  41. _Icon_Coin = GetUIUnit<RectTransform>("Icon_Coin");
  42. }
  43. return _Icon_Coin;
  44. }
  45. }
  46. private RectTransform _expPoint;
  47. public RectTransform expPoint
  48. {
  49. get{
  50. if (_expPoint == null)
  51. {
  52. _expPoint = GetUIUnit<RectTransform>("expPoint");
  53. }
  54. return _expPoint;
  55. }
  56. }
  57. private Slider _exp;
  58. public Slider exp
  59. {
  60. get{
  61. if (_exp == null)
  62. {
  63. _exp = GetUIUnit<Slider>("exp");
  64. }
  65. return _exp;
  66. }
  67. }
  68. private TextMeshProUGUI _TextExp;
  69. public TextMeshProUGUI TextExp
  70. {
  71. get{
  72. if (_TextExp == null)
  73. {
  74. _TextExp = GetUIUnit<TextMeshProUGUI>("TextExp");
  75. }
  76. return _TextExp;
  77. }
  78. }
  79. private TextMeshProUGUI _coinText;
  80. public TextMeshProUGUI coinText
  81. {
  82. get{
  83. if (_coinText == null)
  84. {
  85. _coinText = GetUIUnit<TextMeshProUGUI>("coinText");
  86. }
  87. return _coinText;
  88. }
  89. }
  90. private GameObject _Slider_Exp_Process;
  91. public GameObject Slider_Exp_Process
  92. {
  93. get{
  94. if (_Slider_Exp_Process == null)
  95. {
  96. _Slider_Exp_Process = GetUIUnit<GameObject>("Slider_Exp_Process");
  97. }
  98. return _Slider_Exp_Process;
  99. }
  100. }
  101. private GameObject _bossHp;
  102. public GameObject bossHp
  103. {
  104. get{
  105. if (_bossHp == null)
  106. {
  107. _bossHp = GetUIUnit<GameObject>("bossHp");
  108. }
  109. return _bossHp;
  110. }
  111. }
  112. private Slider _Slider_Hp_Boss;
  113. public Slider Slider_Hp_Boss
  114. {
  115. get{
  116. if (_Slider_Hp_Boss == null)
  117. {
  118. _Slider_Hp_Boss = GetUIUnit<Slider>("Slider_Hp_Boss");
  119. }
  120. return _Slider_Hp_Boss;
  121. }
  122. }
  123. private Text _bossName;
  124. public Text bossName
  125. {
  126. get{
  127. if (_bossName == null)
  128. {
  129. _bossName = GetUIUnit<Text>("bossName");
  130. }
  131. return _bossName;
  132. }
  133. }
  134. private TextMeshProUGUI _txtCoin;
  135. public TextMeshProUGUI txtCoin
  136. {
  137. get{
  138. if (_txtCoin == null)
  139. {
  140. _txtCoin = GetUIUnit<TextMeshProUGUI>("txtCoin");
  141. }
  142. return _txtCoin;
  143. }
  144. }
  145. private TextMeshProUGUI _txtDiamond;
  146. public TextMeshProUGUI txtDiamond
  147. {
  148. get{
  149. if (_txtDiamond == null)
  150. {
  151. _txtDiamond = GetUIUnit<TextMeshProUGUI>("txtDiamond");
  152. }
  153. return _txtDiamond;
  154. }
  155. }
  156. private TextMeshProUGUI _txtHeroExp;
  157. public TextMeshProUGUI txtHeroExp
  158. {
  159. get{
  160. if (_txtHeroExp == null)
  161. {
  162. _txtHeroExp = GetUIUnit<TextMeshProUGUI>("txtHeroExp");
  163. }
  164. return _txtHeroExp;
  165. }
  166. }
  167. private GameObject _fx_ui_coin;
  168. public GameObject fx_ui_coin
  169. {
  170. get{
  171. if (_fx_ui_coin == null)
  172. {
  173. _fx_ui_coin = GetUIUnit<GameObject>("fx_ui_coin");
  174. }
  175. return _fx_ui_coin;
  176. }
  177. }
  178. private GameObject _fx_ui_exp;
  179. public GameObject fx_ui_exp
  180. {
  181. get{
  182. if (_fx_ui_exp == null)
  183. {
  184. _fx_ui_exp = GetUIUnit<GameObject>("fx_ui_exp");
  185. }
  186. return _fx_ui_exp;
  187. }
  188. }
  189. private TextMeshProUGUI _levelName;
  190. public TextMeshProUGUI levelName
  191. {
  192. get{
  193. if (_levelName == null)
  194. {
  195. _levelName = GetUIUnit<TextMeshProUGUI>("levelName");
  196. }
  197. return _levelName;
  198. }
  199. }
  200. private Button _btnHeroBag;
  201. public Button btnHeroBag
  202. {
  203. get{
  204. if (_btnHeroBag == null)
  205. {
  206. _btnHeroBag = GetUIUnit<Button>("btnHeroBag");
  207. }
  208. return _btnHeroBag;
  209. }
  210. }
  211. private Button _Button_battleBoss;
  212. public Button Button_battleBoss
  213. {
  214. get{
  215. if (_Button_battleBoss == null)
  216. {
  217. _Button_battleBoss = GetUIUnit<Button>("Button_battleBoss");
  218. }
  219. return _Button_battleBoss;
  220. }
  221. }
  222. private MyImage _Icon_HeroExp;
  223. public MyImage Icon_HeroExp
  224. {
  225. get{
  226. if (_Icon_HeroExp == null)
  227. {
  228. _Icon_HeroExp = GetUIUnit<MyImage>("Icon_HeroExp");
  229. }
  230. return _Icon_HeroExp;
  231. }
  232. }
  233. private Button _box;
  234. public Button box
  235. {
  236. get{
  237. if (_box == null)
  238. {
  239. _box = GetUIUnit<Button>("box");
  240. }
  241. return _box;
  242. }
  243. }
  244. private Button _Button_huiQiu;
  245. public Button Button_huiQiu
  246. {
  247. get{
  248. if (_Button_huiQiu == null)
  249. {
  250. _Button_huiQiu = GetUIUnit<Button>("Button_huiQiu");
  251. }
  252. return _Button_huiQiu;
  253. }
  254. }
  255. private UITweenController _Button_huiQiu_tween;
  256. public UITweenController Button_huiQiu_tween
  257. {
  258. get{
  259. if (_Button_huiQiu_tween == null)
  260. {
  261. _Button_huiQiu_tween = GetUIUnit<UITweenController>("Button_huiQiu_tween");
  262. }
  263. return _Button_huiQiu_tween;
  264. }
  265. }
  266. #endregion 自定义数据结束
  267. public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
  268. {
  269. await base.SetUIGameObject(gObjectPoolInterface);
  270. Init();
  271. }
  272. }
  273. }