WjBattleBuffInfoItem_Generate.lua 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. ---@class WjBattleBuffInfoItem__Generate_getBtn_icon
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public image UnityEngine.UI.Image
  4. ---@class WjBattleBuffInfoItem__Generate_getBtn_number
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public text TMPro.TextMeshProUGUI
  7. ---@class WjBattleBuffInfoItem__Generate_getBtn_shadow
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public image UnityEngine.UI.Image
  10. ---@class WjBattleBuffInfoItem__Generate_getBtn
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public button UnityEngine.UI.Button
  13. ---@field public shadow WjBattleBuffInfoItem__Generate_getBtn_shadow
  14. ---@field public number WjBattleBuffInfoItem__Generate_getBtn_number
  15. ---@field public icon WjBattleBuffInfoItem__Generate_getBtn_icon
  16. ---@class WjBattleBuffInfoItem__Generate_descTxt
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public text UnityEngine.UI.Text
  19. ---@class WjBattleBuffInfoItem__Generate_itemIcon
  20. ---@field public gameObject UnityEngine.GameObject
  21. ---@field public image UnityEngine.UI.Image
  22. ---@class WjBattleBuffInfoItem__Generate_itemName
  23. ---@field public gameObject UnityEngine.GameObject
  24. ---@field public text UnityEngine.UI.Text
  25. ---@class WjBattleBuffInfoItem__Generate
  26. ---@field private gameObject UnityEngine.GameObject
  27. ---@field private transform UnityEngine.Transform
  28. ---@field private itemName WjBattleBuffInfoItem__Generate_itemName
  29. ---@field private itemIcon WjBattleBuffInfoItem__Generate_itemIcon
  30. ---@field private sealBtn UnityEngine.GameObject
  31. ---@field private descTxt WjBattleBuffInfoItem__Generate_descTxt
  32. ---@field private getBtn WjBattleBuffInfoItem__Generate_getBtn
  33. local WjBattleBuffInfoItemView = class("WjBattleBuffInfoItemView")
  34. function WjBattleBuffInfoItemView:ctor()
  35. end
  36. ---@private
  37. function WjBattleBuffInfoItemView:SetActive(result)
  38. self.gameObject:SetActive(result)
  39. end
  40. ---@private
  41. function WjBattleBuffInfoItemView:InitGenerate(Root, data)
  42. self.transform = Root
  43. self.inited = true
  44. local tmp
  45. self:InitGenerate__1(Root,data)
  46. self:InitGenerate__2(Root,data)
  47. self:InitGenerate__3(Root,data)
  48. self:InitGenerate__4(Root,data)
  49. self:InitGenerate__5(Root,data)
  50. self:InitGenerate__6(Root,data)
  51. self:InitGenerate__7(Root,data)
  52. self:InitGenerate__8(Root,data)
  53. self:InitGenerate__9(Root,data)
  54. end
  55. ---@private
  56. function WjBattleBuffInfoItemView:InitGenerate__1(Root, data)
  57. --[[
  58. Root
  59. --]]
  60. end
  61. ---@private
  62. function WjBattleBuffInfoItemView:InitGenerate__2(Root, data)
  63. --[[
  64. GoodsName/ItemName
  65. --]]
  66. local tmp = Root:Find("GoodsName/ItemName").gameObject
  67. if tolua.getpeer(tmp) == nil then
  68. tolua.setpeer(tmp, {})
  69. end
  70. self.itemName = tmp
  71. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  72. end
  73. ---@private
  74. function WjBattleBuffInfoItemView:InitGenerate__3(Root, data)
  75. --[[
  76. ItemIcon
  77. --]]
  78. local tmp = Root:Find("ItemIcon").gameObject
  79. if tolua.getpeer(tmp) == nil then
  80. tolua.setpeer(tmp, {})
  81. end
  82. self.itemIcon = tmp
  83. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  84. end
  85. ---@private
  86. function WjBattleBuffInfoItemView:InitGenerate__4(Root, data)
  87. --[[
  88. Seal
  89. --]]
  90. local tmp = Root:Find("Seal").gameObject
  91. if tolua.getpeer(tmp) == nil then
  92. tolua.setpeer(tmp, {})
  93. end
  94. self.sealBtn = tmp
  95. end
  96. ---@private
  97. function WjBattleBuffInfoItemView:InitGenerate__5(Root, data)
  98. --[[
  99. DescTxt
  100. --]]
  101. local tmp = Root:Find("DescTxt").gameObject
  102. if tolua.getpeer(tmp) == nil then
  103. tolua.setpeer(tmp, {})
  104. end
  105. self.descTxt = tmp
  106. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  107. end
  108. ---@private
  109. function WjBattleBuffInfoItemView:InitGenerate__6(Root, data)
  110. --[[
  111. GetBtn
  112. --]]
  113. local tmp = Root:Find("GetBtn").gameObject
  114. if tolua.getpeer(tmp) == nil then
  115. tolua.setpeer(tmp, {})
  116. end
  117. self.getBtn = tmp
  118. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  119. end
  120. ---@private
  121. function WjBattleBuffInfoItemView:InitGenerate__7(Root, data)
  122. --[[
  123. GetBtn/shadow
  124. --]]
  125. local tmp = Root:Find("GetBtn/shadow").gameObject
  126. if tolua.getpeer(tmp) == nil then
  127. tolua.setpeer(tmp, {})
  128. end
  129. self.getBtn.shadow = tmp
  130. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  131. end
  132. ---@private
  133. function WjBattleBuffInfoItemView:InitGenerate__8(Root, data)
  134. --[[
  135. GetBtn/Number
  136. --]]
  137. local tmp = Root:Find("GetBtn/Number").gameObject
  138. if tolua.getpeer(tmp) == nil then
  139. tolua.setpeer(tmp, {})
  140. end
  141. self.getBtn.number = tmp
  142. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  143. end
  144. ---@private
  145. function WjBattleBuffInfoItemView:InitGenerate__9(Root, data)
  146. --[[
  147. GetBtn/Icon
  148. --]]
  149. local tmp = Root:Find("GetBtn/Icon").gameObject
  150. if tolua.getpeer(tmp) == nil then
  151. tolua.setpeer(tmp, {})
  152. end
  153. self.getBtn.icon = tmp
  154. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  155. end
  156. ---@private
  157. function WjBattleBuffInfoItemView:GenerateDestroy()
  158. if tolua.getpeer(self.getBtn.icon) ~= nil then
  159. tolua.setpeer(self.getBtn.icon, nil)
  160. end
  161. if tolua.getpeer(self.getBtn.number) ~= nil then
  162. tolua.setpeer(self.getBtn.number, nil)
  163. end
  164. if tolua.getpeer(self.getBtn.shadow) ~= nil then
  165. tolua.setpeer(self.getBtn.shadow, nil)
  166. end
  167. if tolua.getpeer(self.itemName) ~= nil then
  168. tolua.setpeer(self.itemName, nil)
  169. end
  170. self.itemName = nil
  171. if tolua.getpeer(self.itemIcon) ~= nil then
  172. tolua.setpeer(self.itemIcon, nil)
  173. end
  174. self.itemIcon = nil
  175. if tolua.getpeer(self.sealBtn) ~= nil then
  176. tolua.setpeer(self.sealBtn, nil)
  177. end
  178. self.sealBtn = nil
  179. if tolua.getpeer(self.descTxt) ~= nil then
  180. tolua.setpeer(self.descTxt, nil)
  181. end
  182. self.descTxt = nil
  183. if tolua.getpeer(self.getBtn) ~= nil then
  184. tolua.setpeer(self.getBtn, nil)
  185. end
  186. self.getBtn = nil
  187. self.transform = nil
  188. self.gameObject = nil
  189. self.inited = false
  190. end
  191. return WjBattleBuffInfoItemView