EquipItem_Generate.lua 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. ---@class EquipItem__Generate_textLV
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class EquipItem__Generate_num
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public text TMPro.TextMeshProUGUI
  7. ---@class EquipItem__Generate_equipLv
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public image UnityEngine.UI.Image
  10. ---@class EquipItem__Generate_number
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public text UnityEngine.UI.Text
  13. ---@class EquipItem__Generate_lvBG
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public image UnityEngine.UI.Image
  16. ---@class EquipItem__Generate_frame
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public image UnityEngine.UI.Image
  19. ---@class EquipItem__Generate_equip
  20. ---@field public gameObject UnityEngine.GameObject
  21. ---@field public image UnityEngine.UI.Image
  22. ---@class EquipItem__Generate_bg
  23. ---@field public gameObject UnityEngine.GameObject
  24. ---@field public image UnityEngine.UI.Image
  25. ---@field public button UnityEngine.UI.Button
  26. ---@class EquipItem__Generate
  27. ---@field private gameObject UnityEngine.GameObject
  28. ---@field private transform UnityEngine.Transform
  29. ---@field private bg EquipItem__Generate_bg
  30. ---@field private equip EquipItem__Generate_equip
  31. ---@field private frame EquipItem__Generate_frame
  32. ---@field private lvBG EquipItem__Generate_lvBG
  33. ---@field private number EquipItem__Generate_number
  34. ---@field private equipLv EquipItem__Generate_equipLv
  35. ---@field private num EquipItem__Generate_num
  36. ---@field private textLV EquipItem__Generate_textLV
  37. ---@field private selected UnityEngine.GameObject
  38. ---@field private redPoint UnityEngine.GameObject
  39. local EquipItemView = class("EquipItemView")
  40. function EquipItemView:ctor()
  41. end
  42. ---@private
  43. function EquipItemView:SetActive(result)
  44. self.gameObject:SetActive(result)
  45. end
  46. ---@private
  47. function EquipItemView:InitGenerate(Root, data)
  48. self.transform = Root
  49. self.inited = true
  50. local tmp
  51. self:InitGenerate__1(Root,data)
  52. self:InitGenerate__2(Root,data)
  53. self:InitGenerate__3(Root,data)
  54. self:InitGenerate__4(Root,data)
  55. self:InitGenerate__5(Root,data)
  56. self:InitGenerate__6(Root,data)
  57. self:InitGenerate__7(Root,data)
  58. self:InitGenerate__8(Root,data)
  59. self:InitGenerate__9(Root,data)
  60. self:InitGenerate__10(Root,data)
  61. self:InitGenerate__11(Root,data)
  62. end
  63. ---@private
  64. function EquipItemView:InitGenerate__1(Root, data)
  65. --[[
  66. Root
  67. --]]
  68. end
  69. ---@private
  70. function EquipItemView:InitGenerate__2(Root, data)
  71. --[[
  72. Bg
  73. --]]
  74. local tmp = Root:Find("Bg").gameObject
  75. if tolua.getpeer(tmp) == nil then
  76. tolua.setpeer(tmp, {})
  77. end
  78. self.bg = tmp
  79. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  80. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  81. end
  82. ---@private
  83. function EquipItemView:InitGenerate__3(Root, data)
  84. --[[
  85. Equip
  86. --]]
  87. local tmp = Root:Find("Equip").gameObject
  88. if tolua.getpeer(tmp) == nil then
  89. tolua.setpeer(tmp, {})
  90. end
  91. self.equip = tmp
  92. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  93. end
  94. ---@private
  95. function EquipItemView:InitGenerate__4(Root, data)
  96. --[[
  97. Frame
  98. --]]
  99. local tmp = Root:Find("Frame").gameObject
  100. if tolua.getpeer(tmp) == nil then
  101. tolua.setpeer(tmp, {})
  102. end
  103. self.frame = tmp
  104. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  105. end
  106. ---@private
  107. function EquipItemView:InitGenerate__5(Root, data)
  108. --[[
  109. LvBG
  110. --]]
  111. local tmp = Root:Find("LvBG").gameObject
  112. if tolua.getpeer(tmp) == nil then
  113. tolua.setpeer(tmp, {})
  114. end
  115. self.lvBG = tmp
  116. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  117. end
  118. ---@private
  119. function EquipItemView:InitGenerate__6(Root, data)
  120. --[[
  121. Number
  122. --]]
  123. local tmp = Root:Find("Number").gameObject
  124. if tolua.getpeer(tmp) == nil then
  125. tolua.setpeer(tmp, {})
  126. end
  127. self.number = tmp
  128. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  129. end
  130. ---@private
  131. function EquipItemView:InitGenerate__7(Root, data)
  132. --[[
  133. EquipLv
  134. --]]
  135. local tmp = Root:Find("EquipLv").gameObject
  136. if tolua.getpeer(tmp) == nil then
  137. tolua.setpeer(tmp, {})
  138. end
  139. self.equipLv = tmp
  140. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  141. end
  142. ---@private
  143. function EquipItemView:InitGenerate__8(Root, data)
  144. --[[
  145. Num
  146. --]]
  147. local tmp = Root:Find("Num").gameObject
  148. if tolua.getpeer(tmp) == nil then
  149. tolua.setpeer(tmp, {})
  150. end
  151. self.num = tmp
  152. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  153. end
  154. ---@private
  155. function EquipItemView:InitGenerate__9(Root, data)
  156. --[[
  157. TextLV
  158. --]]
  159. local tmp = Root:Find("TextLV").gameObject
  160. if tolua.getpeer(tmp) == nil then
  161. tolua.setpeer(tmp, {})
  162. end
  163. self.textLV = tmp
  164. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  165. end
  166. ---@private
  167. function EquipItemView:InitGenerate__10(Root, data)
  168. --[[
  169. Selected
  170. --]]
  171. local tmp = Root:Find("Selected").gameObject
  172. if tolua.getpeer(tmp) == nil then
  173. tolua.setpeer(tmp, {})
  174. end
  175. self.selected = tmp
  176. end
  177. ---@private
  178. function EquipItemView:InitGenerate__11(Root, data)
  179. --[[
  180. RedPoint
  181. --]]
  182. local tmp = Root:Find("RedPoint").gameObject
  183. if tolua.getpeer(tmp) == nil then
  184. tolua.setpeer(tmp, {})
  185. end
  186. self.redPoint = tmp
  187. end
  188. ---@private
  189. function EquipItemView:GenerateDestroy()
  190. if tolua.getpeer(self.bg) ~= nil then
  191. tolua.setpeer(self.bg, nil)
  192. end
  193. self.bg = nil
  194. if tolua.getpeer(self.equip) ~= nil then
  195. tolua.setpeer(self.equip, nil)
  196. end
  197. self.equip = nil
  198. if tolua.getpeer(self.frame) ~= nil then
  199. tolua.setpeer(self.frame, nil)
  200. end
  201. self.frame = nil
  202. if tolua.getpeer(self.lvBG) ~= nil then
  203. tolua.setpeer(self.lvBG, nil)
  204. end
  205. self.lvBG = nil
  206. if tolua.getpeer(self.number) ~= nil then
  207. tolua.setpeer(self.number, nil)
  208. end
  209. self.number = nil
  210. if tolua.getpeer(self.equipLv) ~= nil then
  211. tolua.setpeer(self.equipLv, nil)
  212. end
  213. self.equipLv = nil
  214. if tolua.getpeer(self.num) ~= nil then
  215. tolua.setpeer(self.num, nil)
  216. end
  217. self.num = nil
  218. if tolua.getpeer(self.textLV) ~= nil then
  219. tolua.setpeer(self.textLV, nil)
  220. end
  221. self.textLV = nil
  222. if tolua.getpeer(self.selected) ~= nil then
  223. tolua.setpeer(self.selected, nil)
  224. end
  225. self.selected = nil
  226. if tolua.getpeer(self.redPoint) ~= nil then
  227. tolua.setpeer(self.redPoint, nil)
  228. end
  229. self.redPoint = nil
  230. self.transform = nil
  231. self.gameObject = nil
  232. self.inited = false
  233. end
  234. return EquipItemView