SkillUIComponentData.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. using Fort23.Core;
  2. using Fort23.UTool;
  3. using UnityEngine.UI;
  4. using UnityEngine;
  5. using System.Collections.Generic;
  6. namespace Fort23.Mono
  7. {
  8. public partial class SkillUIComponent
  9. {
  10. #region 自定义数据
  11. private Text _txtSkillName;
  12. public Text txtSkillName
  13. {
  14. get{
  15. if (_txtSkillName == null)
  16. {
  17. _txtSkillName = GetUIUnit<Text>("txtSkillName");
  18. }
  19. return _txtSkillName;
  20. }
  21. }
  22. private Text _txtLv;
  23. public Text txtLv
  24. {
  25. get{
  26. if (_txtLv == null)
  27. {
  28. _txtLv = GetUIUnit<Text>("txtLv");
  29. }
  30. return _txtLv;
  31. }
  32. }
  33. private Text _txtCD;
  34. public Text txtCD
  35. {
  36. get{
  37. if (_txtCD == null)
  38. {
  39. _txtCD = GetUIUnit<Text>("txtCD");
  40. }
  41. return _txtCD;
  42. }
  43. }
  44. private Text _txSkillLv1Desc;
  45. public Text txSkillLv1Desc
  46. {
  47. get{
  48. if (_txSkillLv1Desc == null)
  49. {
  50. _txSkillLv1Desc = GetUIUnit<Text>("txSkillLv1Desc");
  51. }
  52. return _txSkillLv1Desc;
  53. }
  54. }
  55. private Text _txSkillLv2Add;
  56. public Text txSkillLv2Add
  57. {
  58. get{
  59. if (_txSkillLv2Add == null)
  60. {
  61. _txSkillLv2Add = GetUIUnit<Text>("txSkillLv2Add");
  62. }
  63. return _txSkillLv2Add;
  64. }
  65. }
  66. private Text _txSkillLv3Add;
  67. public Text txSkillLv3Add
  68. {
  69. get{
  70. if (_txSkillLv3Add == null)
  71. {
  72. _txSkillLv3Add = GetUIUnit<Text>("txSkillLv3Add");
  73. }
  74. return _txSkillLv3Add;
  75. }
  76. }
  77. private Text _txSkillLv4Add;
  78. public Text txSkillLv4Add
  79. {
  80. get{
  81. if (_txSkillLv4Add == null)
  82. {
  83. _txSkillLv4Add = GetUIUnit<Text>("txSkillLv4Add");
  84. }
  85. return _txSkillLv4Add;
  86. }
  87. }
  88. private RectTransform _skillRoot;
  89. public RectTransform skillRoot
  90. {
  91. get{
  92. if (_skillRoot == null)
  93. {
  94. _skillRoot = GetUIUnit<RectTransform>("skillRoot");
  95. }
  96. return _skillRoot;
  97. }
  98. }
  99. private Text _txtTips;
  100. public Text txtTips
  101. {
  102. get{
  103. if (_txtTips == null)
  104. {
  105. _txtTips = GetUIUnit<Text>("txtTips");
  106. }
  107. return _txtTips;
  108. }
  109. }
  110. private List<object> _skillDesc;
  111. public List<object> skillDesc
  112. {
  113. get{
  114. if (_skillDesc == null)
  115. {
  116. _skillDesc = GetUIUnit<List<object>>("skillDesc");
  117. }
  118. return _skillDesc;
  119. }
  120. }
  121. private VerticalLayoutGroup _layoutGroup;
  122. public VerticalLayoutGroup layoutGroup
  123. {
  124. get{
  125. if (_layoutGroup == null)
  126. {
  127. _layoutGroup = GetUIUnit<VerticalLayoutGroup>("layoutGroup");
  128. }
  129. return _layoutGroup;
  130. }
  131. }
  132. private Button _btnBack;
  133. public Button btnBack
  134. {
  135. get{
  136. if (_btnBack == null)
  137. {
  138. _btnBack = GetUIUnit<Button>("btnBack");
  139. }
  140. return _btnBack;
  141. }
  142. }
  143. #endregion 自定义数据结束
  144. public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
  145. {
  146. await base.SetUIGameObject(gObjectPoolInterface);
  147. Init();
  148. }
  149. }
  150. }