HeroDetailPanelData.cs 5.0 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 HeroDetailPanel
  10. {
  11. #region 自定义数据
  12. private Button _btnBack;
  13. public Button btnBack
  14. {
  15. get{
  16. if (_btnBack == null)
  17. {
  18. _btnBack = GetUIUnit<Button>("btnBack");
  19. }
  20. return _btnBack;
  21. }
  22. }
  23. private Text _heroRarity;
  24. public Text heroRarity
  25. {
  26. get{
  27. if (_heroRarity == null)
  28. {
  29. _heroRarity = GetUIUnit<Text>("heroRarity");
  30. }
  31. return _heroRarity;
  32. }
  33. }
  34. private Text _heroName;
  35. public Text heroName
  36. {
  37. get{
  38. if (_heroName == null)
  39. {
  40. _heroName = GetUIUnit<Text>("heroName");
  41. }
  42. return _heroName;
  43. }
  44. }
  45. private List<object> _stars;
  46. public List<object> stars
  47. {
  48. get{
  49. if (_stars == null)
  50. {
  51. _stars = GetUIUnit<List<object>>("stars");
  52. }
  53. return _stars;
  54. }
  55. }
  56. private MyImage _iconZhiYe;
  57. public MyImage iconZhiYe
  58. {
  59. get{
  60. if (_iconZhiYe == null)
  61. {
  62. _iconZhiYe = GetUIUnit<MyImage>("iconZhiYe");
  63. }
  64. return _iconZhiYe;
  65. }
  66. }
  67. private TextMeshProUGUI _txtHP;
  68. public TextMeshProUGUI txtHP
  69. {
  70. get{
  71. if (_txtHP == null)
  72. {
  73. _txtHP = GetUIUnit<TextMeshProUGUI>("txtHP");
  74. }
  75. return _txtHP;
  76. }
  77. }
  78. private TextMeshProUGUI _txtATK;
  79. public TextMeshProUGUI txtATK
  80. {
  81. get{
  82. if (_txtATK == null)
  83. {
  84. _txtATK = GetUIUnit<TextMeshProUGUI>("txtATK");
  85. }
  86. return _txtATK;
  87. }
  88. }
  89. private TextMeshProUGUI _txtDEF;
  90. public TextMeshProUGUI txtDEF
  91. {
  92. get{
  93. if (_txtDEF == null)
  94. {
  95. _txtDEF = GetUIUnit<TextMeshProUGUI>("txtDEF");
  96. }
  97. return _txtDEF;
  98. }
  99. }
  100. private TextMeshProUGUI _txtSHANBI;
  101. public TextMeshProUGUI txtSHANBI
  102. {
  103. get{
  104. if (_txtSHANBI == null)
  105. {
  106. _txtSHANBI = GetUIUnit<TextMeshProUGUI>("txtSHANBI");
  107. }
  108. return _txtSHANBI;
  109. }
  110. }
  111. private TextMeshProUGUI _txtLv;
  112. public TextMeshProUGUI txtLv
  113. {
  114. get{
  115. if (_txtLv == null)
  116. {
  117. _txtLv = GetUIUnit<TextMeshProUGUI>("txtLv");
  118. }
  119. return _txtLv;
  120. }
  121. }
  122. private TextMeshProUGUI _txtExpGain;
  123. public TextMeshProUGUI txtExpGain
  124. {
  125. get{
  126. if (_txtExpGain == null)
  127. {
  128. _txtExpGain = GetUIUnit<TextMeshProUGUI>("txtExpGain");
  129. }
  130. return _txtExpGain;
  131. }
  132. }
  133. private TextMeshProUGUI _txtUpgrade;
  134. public TextMeshProUGUI txtUpgrade
  135. {
  136. get{
  137. if (_txtUpgrade == null)
  138. {
  139. _txtUpgrade = GetUIUnit<TextMeshProUGUI>("txtUpgrade");
  140. }
  141. return _txtUpgrade;
  142. }
  143. }
  144. private TextMeshProUGUI _txtPromote;
  145. public TextMeshProUGUI txtPromote
  146. {
  147. get{
  148. if (_txtPromote == null)
  149. {
  150. _txtPromote = GetUIUnit<TextMeshProUGUI>("txtPromote");
  151. }
  152. return _txtPromote;
  153. }
  154. }
  155. private MyImage _heroShards;
  156. public MyImage heroShards
  157. {
  158. get{
  159. if (_heroShards == null)
  160. {
  161. _heroShards = GetUIUnit<MyImage>("heroShards");
  162. }
  163. return _heroShards;
  164. }
  165. }
  166. private TextMeshProUGUI _txtBasicEquipLv;
  167. public TextMeshProUGUI txtBasicEquipLv
  168. {
  169. get{
  170. if (_txtBasicEquipLv == null)
  171. {
  172. _txtBasicEquipLv = GetUIUnit<TextMeshProUGUI>("txtBasicEquipLv");
  173. }
  174. return _txtBasicEquipLv;
  175. }
  176. }
  177. private MyImage _iconCommonEquip;
  178. public MyImage iconCommonEquip
  179. {
  180. get{
  181. if (_iconCommonEquip == null)
  182. {
  183. _iconCommonEquip = GetUIUnit<MyImage>("iconCommonEquip");
  184. }
  185. return _iconCommonEquip;
  186. }
  187. }
  188. private MyImage _iconSpecailEquip;
  189. public MyImage iconSpecailEquip
  190. {
  191. get{
  192. if (_iconSpecailEquip == null)
  193. {
  194. _iconSpecailEquip = GetUIUnit<MyImage>("iconSpecailEquip");
  195. }
  196. return _iconSpecailEquip;
  197. }
  198. }
  199. private GameObject _lockObj;
  200. public GameObject lockObj
  201. {
  202. get{
  203. if (_lockObj == null)
  204. {
  205. _lockObj = GetUIUnit<GameObject>("lockObj");
  206. }
  207. return _lockObj;
  208. }
  209. }
  210. private Button _btnUpgrade;
  211. public Button btnUpgrade
  212. {
  213. get{
  214. if (_btnUpgrade == null)
  215. {
  216. _btnUpgrade = GetUIUnit<Button>("btnUpgrade");
  217. }
  218. return _btnUpgrade;
  219. }
  220. }
  221. private Button _btnPromote;
  222. public Button btnPromote
  223. {
  224. get{
  225. if (_btnPromote == null)
  226. {
  227. _btnPromote = GetUIUnit<Button>("btnPromote");
  228. }
  229. return _btnPromote;
  230. }
  231. }
  232. #endregion 自定义数据结束
  233. public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
  234. {
  235. await base.SetUIGameObject(gObjectPoolInterface);
  236. Init();
  237. }
  238. }
  239. }