EquipmentShowSlotItem_Generate.lua 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. ---@class EquipmentShowSlotItem__Generate_card4
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public image UnityEngine.UI.Image
  4. ---@class EquipmentShowSlotItem__Generate_card3
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public image UnityEngine.UI.Image
  7. ---@class EquipmentShowSlotItem__Generate_card2
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public image UnityEngine.UI.Image
  10. ---@class EquipmentShowSlotItem__Generate_card1
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public image UnityEngine.UI.Image
  13. ---@class EquipmentShowSlotItem__Generate_bgPlus
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public image UnityEngine.UI.Image
  16. ---@class EquipmentShowSlotItem__Generate_iconItem
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public rectTransform UnityEngine.RectTransform
  19. ---@field public layoutElement UnityEngine.UI.LayoutElement
  20. ---@class EquipmentShowSlotItem__Generate_position
  21. ---@field public gameObject UnityEngine.GameObject
  22. ---@field public image UnityEngine.UI.Image
  23. ---@class EquipmentShowSlotItem__Generate_tipButton
  24. ---@field public gameObject UnityEngine.GameObject
  25. ---@field public button UnityEngine.UI.Button
  26. ---@class EquipmentShowSlotItem__Generate
  27. ---@field private gameObject UnityEngine.GameObject
  28. ---@field private transform UnityEngine.Transform
  29. ---@field private tipButton EquipmentShowSlotItem__Generate_tipButton
  30. ---@field private blank UnityEngine.GameObject
  31. ---@field private position EquipmentShowSlotItem__Generate_position
  32. ---@field private iconItem EquipmentShowSlotItem__Generate_iconItem
  33. ---@field private cardPlus UnityEngine.GameObject
  34. ---@field private bgPlus EquipmentShowSlotItem__Generate_bgPlus
  35. ---@field private slot1 UnityEngine.GameObject
  36. ---@field private card1 EquipmentShowSlotItem__Generate_card1
  37. ---@field private slot2 UnityEngine.GameObject
  38. ---@field private card2 EquipmentShowSlotItem__Generate_card2
  39. ---@field private slot3 UnityEngine.GameObject
  40. ---@field private card3 EquipmentShowSlotItem__Generate_card3
  41. ---@field private slot4 UnityEngine.GameObject
  42. ---@field private card4 EquipmentShowSlotItem__Generate_card4
  43. local EquipmentShowSlotItemView = class("EquipmentShowSlotItemView")
  44. function EquipmentShowSlotItemView:ctor()
  45. end
  46. ---@private
  47. function EquipmentShowSlotItemView:SetActive(result)
  48. self.gameObject:SetActive(result)
  49. end
  50. ---@private
  51. function EquipmentShowSlotItemView:InitGenerate(Root, data)
  52. self.transform = Root
  53. self.inited = true
  54. local tmp
  55. self:InitGenerate__1(Root,data)
  56. self:InitGenerate__2(Root,data)
  57. self:InitGenerate__3(Root,data)
  58. self:InitGenerate__4(Root,data)
  59. self:InitGenerate__5(Root,data)
  60. self:InitGenerate__6(Root,data)
  61. self:InitGenerate__7(Root,data)
  62. self:InitGenerate__8(Root,data)
  63. self:InitGenerate__9(Root,data)
  64. self:InitGenerate__10(Root,data)
  65. self:InitGenerate__11(Root,data)
  66. self:InitGenerate__12(Root,data)
  67. self:InitGenerate__13(Root,data)
  68. self:InitGenerate__14(Root,data)
  69. self:InitGenerate__15(Root,data)
  70. end
  71. ---@private
  72. function EquipmentShowSlotItemView:InitGenerate__1(Root, data)
  73. --[[
  74. Root
  75. --]]
  76. end
  77. ---@private
  78. function EquipmentShowSlotItemView:InitGenerate__2(Root, data)
  79. --[[
  80. bg
  81. --]]
  82. local tmp = Root:Find("bg").gameObject
  83. if tolua.getpeer(tmp) == nil then
  84. tolua.setpeer(tmp, {})
  85. end
  86. self.tipButton = tmp
  87. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  88. end
  89. ---@private
  90. function EquipmentShowSlotItemView:InitGenerate__3(Root, data)
  91. --[[
  92. Blank
  93. --]]
  94. local tmp = Root:Find("Blank").gameObject
  95. if tolua.getpeer(tmp) == nil then
  96. tolua.setpeer(tmp, {})
  97. end
  98. self.blank = tmp
  99. end
  100. ---@private
  101. function EquipmentShowSlotItemView:InitGenerate__4(Root, data)
  102. --[[
  103. Blank/Position
  104. --]]
  105. local tmp = Root:Find("Blank/Position").gameObject
  106. if tolua.getpeer(tmp) == nil then
  107. tolua.setpeer(tmp, {})
  108. end
  109. self.position = tmp
  110. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  111. end
  112. ---@private
  113. function EquipmentShowSlotItemView:InitGenerate__5(Root, data)
  114. --[[
  115. IconItem
  116. --]]
  117. local tmp = Root:Find("IconItem").gameObject
  118. if tolua.getpeer(tmp) == nil then
  119. tolua.setpeer(tmp, {})
  120. end
  121. self.iconItem = CommonUtil.BindGridViewItem2LuaStatic("IconItem", tmp)
  122. self.iconItem.prefabName = "IconItem"
  123. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  124. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  125. end
  126. ---@private
  127. function EquipmentShowSlotItemView:InitGenerate__6(Root, data)
  128. --[[
  129. CardPlus
  130. --]]
  131. local tmp = Root:Find("CardPlus").gameObject
  132. if tolua.getpeer(tmp) == nil then
  133. tolua.setpeer(tmp, {})
  134. end
  135. self.cardPlus = tmp
  136. end
  137. ---@private
  138. function EquipmentShowSlotItemView:InitGenerate__7(Root, data)
  139. --[[
  140. CardPlus/BgPlus
  141. --]]
  142. local tmp = Root:Find("CardPlus/BgPlus").gameObject
  143. if tolua.getpeer(tmp) == nil then
  144. tolua.setpeer(tmp, {})
  145. end
  146. self.bgPlus = tmp
  147. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  148. end
  149. ---@private
  150. function EquipmentShowSlotItemView:InitGenerate__8(Root, data)
  151. --[[
  152. CardPlus/CardsGrid/Slot1
  153. --]]
  154. local tmp = Root:Find("CardPlus/CardsGrid/Slot1").gameObject
  155. if tolua.getpeer(tmp) == nil then
  156. tolua.setpeer(tmp, {})
  157. end
  158. self.slot1 = tmp
  159. end
  160. ---@private
  161. function EquipmentShowSlotItemView:InitGenerate__9(Root, data)
  162. --[[
  163. CardPlus/CardsGrid/Slot1/Card1
  164. --]]
  165. local tmp = Root:Find("CardPlus/CardsGrid/Slot1/Card1").gameObject
  166. if tolua.getpeer(tmp) == nil then
  167. tolua.setpeer(tmp, {})
  168. end
  169. self.card1 = tmp
  170. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  171. end
  172. ---@private
  173. function EquipmentShowSlotItemView:InitGenerate__10(Root, data)
  174. --[[
  175. CardPlus/CardsGrid/Slot2
  176. --]]
  177. local tmp = Root:Find("CardPlus/CardsGrid/Slot2").gameObject
  178. if tolua.getpeer(tmp) == nil then
  179. tolua.setpeer(tmp, {})
  180. end
  181. self.slot2 = tmp
  182. end
  183. ---@private
  184. function EquipmentShowSlotItemView:InitGenerate__11(Root, data)
  185. --[[
  186. CardPlus/CardsGrid/Slot2/Card2
  187. --]]
  188. local tmp = Root:Find("CardPlus/CardsGrid/Slot2/Card2").gameObject
  189. if tolua.getpeer(tmp) == nil then
  190. tolua.setpeer(tmp, {})
  191. end
  192. self.card2 = tmp
  193. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  194. end
  195. ---@private
  196. function EquipmentShowSlotItemView:InitGenerate__12(Root, data)
  197. --[[
  198. CardPlus/CardsGrid/Slot3
  199. --]]
  200. local tmp = Root:Find("CardPlus/CardsGrid/Slot3").gameObject
  201. if tolua.getpeer(tmp) == nil then
  202. tolua.setpeer(tmp, {})
  203. end
  204. self.slot3 = tmp
  205. end
  206. ---@private
  207. function EquipmentShowSlotItemView:InitGenerate__13(Root, data)
  208. --[[
  209. CardPlus/CardsGrid/Slot3/Card3
  210. --]]
  211. local tmp = Root:Find("CardPlus/CardsGrid/Slot3/Card3").gameObject
  212. if tolua.getpeer(tmp) == nil then
  213. tolua.setpeer(tmp, {})
  214. end
  215. self.card3 = tmp
  216. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  217. end
  218. ---@private
  219. function EquipmentShowSlotItemView:InitGenerate__14(Root, data)
  220. --[[
  221. CardPlus/CardsGrid/Slot4
  222. --]]
  223. local tmp = Root:Find("CardPlus/CardsGrid/Slot4").gameObject
  224. if tolua.getpeer(tmp) == nil then
  225. tolua.setpeer(tmp, {})
  226. end
  227. self.slot4 = tmp
  228. end
  229. ---@private
  230. function EquipmentShowSlotItemView:InitGenerate__15(Root, data)
  231. --[[
  232. CardPlus/CardsGrid/Slot4/Card4
  233. --]]
  234. local tmp = Root:Find("CardPlus/CardsGrid/Slot4/Card4").gameObject
  235. if tolua.getpeer(tmp) == nil then
  236. tolua.setpeer(tmp, {})
  237. end
  238. self.card4 = tmp
  239. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  240. end
  241. ---@private
  242. function EquipmentShowSlotItemView:GenerateDestroy()
  243. if tolua.getpeer(self.tipButton) ~= nil then
  244. tolua.setpeer(self.tipButton, nil)
  245. end
  246. self.tipButton = nil
  247. if tolua.getpeer(self.blank) ~= nil then
  248. tolua.setpeer(self.blank, nil)
  249. end
  250. self.blank = nil
  251. if tolua.getpeer(self.position) ~= nil then
  252. tolua.setpeer(self.position, nil)
  253. end
  254. self.position = nil
  255. if self.iconItem.GenerateDestroy ~= nil then
  256. self.iconItem:GenerateDestroy()
  257. end
  258. if tolua.getpeer(self.iconItem) ~= nil then
  259. tolua.setpeer(self.iconItem, nil)
  260. end
  261. self.iconItem = nil
  262. if tolua.getpeer(self.cardPlus) ~= nil then
  263. tolua.setpeer(self.cardPlus, nil)
  264. end
  265. self.cardPlus = nil
  266. if tolua.getpeer(self.bgPlus) ~= nil then
  267. tolua.setpeer(self.bgPlus, nil)
  268. end
  269. self.bgPlus = nil
  270. if tolua.getpeer(self.slot1) ~= nil then
  271. tolua.setpeer(self.slot1, nil)
  272. end
  273. self.slot1 = nil
  274. if tolua.getpeer(self.card1) ~= nil then
  275. tolua.setpeer(self.card1, nil)
  276. end
  277. self.card1 = nil
  278. if tolua.getpeer(self.slot2) ~= nil then
  279. tolua.setpeer(self.slot2, nil)
  280. end
  281. self.slot2 = nil
  282. if tolua.getpeer(self.card2) ~= nil then
  283. tolua.setpeer(self.card2, nil)
  284. end
  285. self.card2 = nil
  286. if tolua.getpeer(self.slot3) ~= nil then
  287. tolua.setpeer(self.slot3, nil)
  288. end
  289. self.slot3 = nil
  290. if tolua.getpeer(self.card3) ~= nil then
  291. tolua.setpeer(self.card3, nil)
  292. end
  293. self.card3 = nil
  294. if tolua.getpeer(self.slot4) ~= nil then
  295. tolua.setpeer(self.slot4, nil)
  296. end
  297. self.slot4 = nil
  298. if tolua.getpeer(self.card4) ~= nil then
  299. tolua.setpeer(self.card4, nil)
  300. end
  301. self.card4 = nil
  302. self.transform = nil
  303. self.gameObject = nil
  304. self.inited = false
  305. end
  306. return EquipmentShowSlotItemView