ItemPanelData.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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 ItemPanel
  9. {
  10. #region 自定义数据
  11. private Text _txtlName;
  12. public Text txtlName
  13. {
  14. get{
  15. if (_txtlName == null)
  16. {
  17. _txtlName = GetUIUnit<Text>("txtlName");
  18. }
  19. return _txtlName;
  20. }
  21. }
  22. private Button _btnBack;
  23. public Button btnBack
  24. {
  25. get{
  26. if (_btnBack == null)
  27. {
  28. _btnBack = GetUIUnit<Button>("btnBack");
  29. }
  30. return _btnBack;
  31. }
  32. }
  33. private GameObject _diObj;
  34. public GameObject diObj
  35. {
  36. get{
  37. if (_diObj == null)
  38. {
  39. _diObj = GetUIUnit<GameObject>("diObj");
  40. }
  41. return _diObj;
  42. }
  43. }
  44. private RectTransform _itemRoot;
  45. public RectTransform itemRoot
  46. {
  47. get{
  48. if (_itemRoot == null)
  49. {
  50. _itemRoot = GetUIUnit<RectTransform>("itemRoot");
  51. }
  52. return _itemRoot;
  53. }
  54. }
  55. private GameObject _item;
  56. public GameObject item
  57. {
  58. get{
  59. if (_item == null)
  60. {
  61. _item = GetUIUnit<GameObject>("item");
  62. }
  63. return _item;
  64. }
  65. }
  66. private MyImage _zyIcon;
  67. public MyImage zyIcon
  68. {
  69. get{
  70. if (_zyIcon == null)
  71. {
  72. _zyIcon = GetUIUnit<MyImage>("zyIcon");
  73. }
  74. return _zyIcon;
  75. }
  76. }
  77. private Text _desc;
  78. public Text desc
  79. {
  80. get{
  81. if (_desc == null)
  82. {
  83. _desc = GetUIUnit<Text>("desc");
  84. }
  85. return _desc;
  86. }
  87. }
  88. private List<object> _attIcon;
  89. public List<object> attIcon
  90. {
  91. get{
  92. if (_attIcon == null)
  93. {
  94. _attIcon = GetUIUnit<List<object>>("attIcon");
  95. }
  96. return _attIcon;
  97. }
  98. }
  99. private List<object> _attValue;
  100. public List<object> attValue
  101. {
  102. get{
  103. if (_attValue == null)
  104. {
  105. _attValue = GetUIUnit<List<object>>("attValue");
  106. }
  107. return _attValue;
  108. }
  109. }
  110. private Button _btnDi;
  111. public Button btnDi
  112. {
  113. get{
  114. if (_btnDi == null)
  115. {
  116. _btnDi = GetUIUnit<Button>("btnDi");
  117. }
  118. return _btnDi;
  119. }
  120. }
  121. #endregion 自定义数据结束
  122. public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
  123. {
  124. await base.SetUIGameObject(gObjectPoolInterface);
  125. Init();
  126. }
  127. }
  128. }