EuipSlotItem_Generate.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. ---@class EuipSlotItem__Generate_equipFx
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public uIParticle UIExtensions.UIParticle
  4. ---@class EuipSlotItem__Generate_card4
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public image UnityEngine.UI.Image
  7. ---@class EuipSlotItem__Generate_card3
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public image UnityEngine.UI.Image
  10. ---@class EuipSlotItem__Generate_card2
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public image UnityEngine.UI.Image
  13. ---@class EuipSlotItem__Generate_card1
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public image UnityEngine.UI.Image
  16. ---@class EuipSlotItem__Generate_bgPlus
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public image UnityEngine.UI.Image
  19. ---@class EuipSlotItem__Generate_textLv
  20. ---@field public gameObject UnityEngine.GameObject
  21. ---@field public text TMPro.TextMeshProUGUI
  22. ---@class EuipSlotItem__Generate_level
  23. ---@field public gameObject UnityEngine.GameObject
  24. ---@field public image UnityEngine.UI.Image
  25. ---@class EuipSlotItem__Generate_frame
  26. ---@field public gameObject UnityEngine.GameObject
  27. ---@field public image UnityEngine.UI.Image
  28. ---@class EuipSlotItem__Generate_icon
  29. ---@field public gameObject UnityEngine.GameObject
  30. ---@field public image UnityEngine.UI.Image
  31. ---@class EuipSlotItem__Generate_position
  32. ---@field public gameObject UnityEngine.GameObject
  33. ---@field public image UnityEngine.UI.Image
  34. ---@class EuipSlotItem__Generate
  35. ---@field private gameObject UnityEngine.GameObject
  36. ---@field private transform UnityEngine.Transform
  37. ---@field private button UnityEngine.UI.Button
  38. ---@field private blank UnityEngine.GameObject
  39. ---@field private position EuipSlotItem__Generate_position
  40. ---@field private icon EuipSlotItem__Generate_icon
  41. ---@field private frame EuipSlotItem__Generate_frame
  42. ---@field private level EuipSlotItem__Generate_level
  43. ---@field private textLv EuipSlotItem__Generate_textLv
  44. ---@field private par UnityEngine.GameObject
  45. ---@field private cardPlus UnityEngine.GameObject
  46. ---@field private bgPlus EuipSlotItem__Generate_bgPlus
  47. ---@field private slot1 UnityEngine.GameObject
  48. ---@field private card1 EuipSlotItem__Generate_card1
  49. ---@field private slot2 UnityEngine.GameObject
  50. ---@field private card2 EuipSlotItem__Generate_card2
  51. ---@field private slot3 UnityEngine.GameObject
  52. ---@field private card3 EuipSlotItem__Generate_card3
  53. ---@field private slot4 UnityEngine.GameObject
  54. ---@field private card4 EuipSlotItem__Generate_card4
  55. ---@field private equipFx EuipSlotItem__Generate_equipFx
  56. ---@field private mask UnityEngine.GameObject
  57. ---@field private redPointItem UnityEngine.GameObject
  58. local EuipSlotItemView = class("EuipSlotItemView")
  59. function EuipSlotItemView:ctor()
  60. end
  61. ---@private
  62. function EuipSlotItemView:SetActive(result)
  63. self.gameObject:SetActive(result)
  64. end
  65. ---@private
  66. function EuipSlotItemView:InitGenerate(Root, data)
  67. self.transform = Root
  68. self.inited = true
  69. local tmp
  70. self:InitGenerate__1(Root,data)
  71. self:InitGenerate__2(Root,data)
  72. self:InitGenerate__3(Root,data)
  73. self:InitGenerate__4(Root,data)
  74. self:InitGenerate__5(Root,data)
  75. self:InitGenerate__6(Root,data)
  76. self:InitGenerate__7(Root,data)
  77. self:InitGenerate__8(Root,data)
  78. self:InitGenerate__9(Root,data)
  79. self:InitGenerate__10(Root,data)
  80. self:InitGenerate__11(Root,data)
  81. self:InitGenerate__12(Root,data)
  82. self:InitGenerate__13(Root,data)
  83. self:InitGenerate__14(Root,data)
  84. self:InitGenerate__15(Root,data)
  85. self:InitGenerate__16(Root,data)
  86. self:InitGenerate__17(Root,data)
  87. self:InitGenerate__18(Root,data)
  88. self:InitGenerate__19(Root,data)
  89. self:InitGenerate__20(Root,data)
  90. self:InitGenerate__21(Root,data)
  91. end
  92. ---@private
  93. function EuipSlotItemView:InitGenerate__1(Root, data)
  94. --[[
  95. Root
  96. --]]
  97. self.button = Root:GetComponent(Enum.TypeInfo.Button)
  98. end
  99. ---@private
  100. function EuipSlotItemView:InitGenerate__2(Root, data)
  101. --[[
  102. Blank
  103. --]]
  104. local tmp = Root:Find("Blank").gameObject
  105. if tolua.getpeer(tmp) == nil then
  106. tolua.setpeer(tmp, {})
  107. end
  108. self.blank = tmp
  109. end
  110. ---@private
  111. function EuipSlotItemView:InitGenerate__3(Root, data)
  112. --[[
  113. Blank/Position
  114. --]]
  115. local tmp = Root:Find("Blank/Position").gameObject
  116. if tolua.getpeer(tmp) == nil then
  117. tolua.setpeer(tmp, {})
  118. end
  119. self.position = tmp
  120. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  121. end
  122. ---@private
  123. function EuipSlotItemView:InitGenerate__4(Root, data)
  124. --[[
  125. Icon
  126. --]]
  127. local tmp = Root:Find("Icon").gameObject
  128. if tolua.getpeer(tmp) == nil then
  129. tolua.setpeer(tmp, {})
  130. end
  131. self.icon = tmp
  132. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  133. end
  134. ---@private
  135. function EuipSlotItemView:InitGenerate__5(Root, data)
  136. --[[
  137. Frame
  138. --]]
  139. local tmp = Root:Find("Frame").gameObject
  140. if tolua.getpeer(tmp) == nil then
  141. tolua.setpeer(tmp, {})
  142. end
  143. self.frame = tmp
  144. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  145. end
  146. ---@private
  147. function EuipSlotItemView:InitGenerate__6(Root, data)
  148. --[[
  149. Level
  150. --]]
  151. local tmp = Root:Find("Level").gameObject
  152. if tolua.getpeer(tmp) == nil then
  153. tolua.setpeer(tmp, {})
  154. end
  155. self.level = tmp
  156. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  157. end
  158. ---@private
  159. function EuipSlotItemView:InitGenerate__7(Root, data)
  160. --[[
  161. TextLv
  162. --]]
  163. local tmp = Root:Find("TextLv").gameObject
  164. if tolua.getpeer(tmp) == nil then
  165. tolua.setpeer(tmp, {})
  166. end
  167. self.textLv = tmp
  168. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  169. end
  170. ---@private
  171. function EuipSlotItemView:InitGenerate__8(Root, data)
  172. --[[
  173. FX_UI_zhuangbei_dianji
  174. --]]
  175. local tmp = Root:Find("FX_UI_zhuangbei_dianji").gameObject
  176. if tolua.getpeer(tmp) == nil then
  177. tolua.setpeer(tmp, {})
  178. end
  179. self.par = tmp
  180. end
  181. ---@private
  182. function EuipSlotItemView:InitGenerate__9(Root, data)
  183. --[[
  184. CardPlus
  185. --]]
  186. local tmp = Root:Find("CardPlus").gameObject
  187. if tolua.getpeer(tmp) == nil then
  188. tolua.setpeer(tmp, {})
  189. end
  190. self.cardPlus = tmp
  191. end
  192. ---@private
  193. function EuipSlotItemView:InitGenerate__10(Root, data)
  194. --[[
  195. CardPlus/BgPlus
  196. --]]
  197. local tmp = Root:Find("CardPlus/BgPlus").gameObject
  198. if tolua.getpeer(tmp) == nil then
  199. tolua.setpeer(tmp, {})
  200. end
  201. self.bgPlus = tmp
  202. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  203. end
  204. ---@private
  205. function EuipSlotItemView:InitGenerate__11(Root, data)
  206. --[[
  207. CardPlus/CardsGrid/Slot1
  208. --]]
  209. local tmp = Root:Find("CardPlus/CardsGrid/Slot1").gameObject
  210. if tolua.getpeer(tmp) == nil then
  211. tolua.setpeer(tmp, {})
  212. end
  213. self.slot1 = tmp
  214. end
  215. ---@private
  216. function EuipSlotItemView:InitGenerate__12(Root, data)
  217. --[[
  218. CardPlus/CardsGrid/Slot1/Card1
  219. --]]
  220. local tmp = Root:Find("CardPlus/CardsGrid/Slot1/Card1").gameObject
  221. if tolua.getpeer(tmp) == nil then
  222. tolua.setpeer(tmp, {})
  223. end
  224. self.card1 = tmp
  225. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  226. end
  227. ---@private
  228. function EuipSlotItemView:InitGenerate__13(Root, data)
  229. --[[
  230. CardPlus/CardsGrid/Slot2
  231. --]]
  232. local tmp = Root:Find("CardPlus/CardsGrid/Slot2").gameObject
  233. if tolua.getpeer(tmp) == nil then
  234. tolua.setpeer(tmp, {})
  235. end
  236. self.slot2 = tmp
  237. end
  238. ---@private
  239. function EuipSlotItemView:InitGenerate__14(Root, data)
  240. --[[
  241. CardPlus/CardsGrid/Slot2/Card2
  242. --]]
  243. local tmp = Root:Find("CardPlus/CardsGrid/Slot2/Card2").gameObject
  244. if tolua.getpeer(tmp) == nil then
  245. tolua.setpeer(tmp, {})
  246. end
  247. self.card2 = tmp
  248. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  249. end
  250. ---@private
  251. function EuipSlotItemView:InitGenerate__15(Root, data)
  252. --[[
  253. CardPlus/CardsGrid/Slot3
  254. --]]
  255. local tmp = Root:Find("CardPlus/CardsGrid/Slot3").gameObject
  256. if tolua.getpeer(tmp) == nil then
  257. tolua.setpeer(tmp, {})
  258. end
  259. self.slot3 = tmp
  260. end
  261. ---@private
  262. function EuipSlotItemView:InitGenerate__16(Root, data)
  263. --[[
  264. CardPlus/CardsGrid/Slot3/Card3
  265. --]]
  266. local tmp = Root:Find("CardPlus/CardsGrid/Slot3/Card3").gameObject
  267. if tolua.getpeer(tmp) == nil then
  268. tolua.setpeer(tmp, {})
  269. end
  270. self.card3 = tmp
  271. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  272. end
  273. ---@private
  274. function EuipSlotItemView:InitGenerate__17(Root, data)
  275. --[[
  276. CardPlus/CardsGrid/Slot4
  277. --]]
  278. local tmp = Root:Find("CardPlus/CardsGrid/Slot4").gameObject
  279. if tolua.getpeer(tmp) == nil then
  280. tolua.setpeer(tmp, {})
  281. end
  282. self.slot4 = tmp
  283. end
  284. ---@private
  285. function EuipSlotItemView:InitGenerate__18(Root, data)
  286. --[[
  287. CardPlus/CardsGrid/Slot4/Card4
  288. --]]
  289. local tmp = Root:Find("CardPlus/CardsGrid/Slot4/Card4").gameObject
  290. if tolua.getpeer(tmp) == nil then
  291. tolua.setpeer(tmp, {})
  292. end
  293. self.card4 = tmp
  294. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  295. end
  296. ---@private
  297. function EuipSlotItemView:InitGenerate__19(Root, data)
  298. --[[
  299. equipFx
  300. --]]
  301. local tmp = Root:Find("equipFx").gameObject
  302. if tolua.getpeer(tmp) == nil then
  303. tolua.setpeer(tmp, {})
  304. end
  305. self.equipFx = tmp
  306. tmp.uIParticle = tmp:GetComponent(Enum.TypeInfo.UIParticle)
  307. end
  308. ---@private
  309. function EuipSlotItemView:InitGenerate__20(Root, data)
  310. --[[
  311. mask
  312. --]]
  313. local tmp = Root:Find("mask").gameObject
  314. if tolua.getpeer(tmp) == nil then
  315. tolua.setpeer(tmp, {})
  316. end
  317. self.mask = tmp
  318. end
  319. ---@private
  320. function EuipSlotItemView:InitGenerate__21(Root, data)
  321. --[[
  322. RedPointItem
  323. --]]
  324. local tmp = Root:Find("RedPointItem").gameObject
  325. if tolua.getpeer(tmp) == nil then
  326. tolua.setpeer(tmp, {})
  327. end
  328. self.redPointItem = CommonUtil.BindGridViewItem2LuaStatic("RedPointItem", tmp)
  329. self.redPointItem.prefabName = "RedPointItem"
  330. end
  331. ---@private
  332. function EuipSlotItemView:GenerateDestroy()
  333. if tolua.getpeer(self.blank) ~= nil then
  334. tolua.setpeer(self.blank, nil)
  335. end
  336. self.blank = nil
  337. if tolua.getpeer(self.position) ~= nil then
  338. tolua.setpeer(self.position, nil)
  339. end
  340. self.position = nil
  341. if tolua.getpeer(self.icon) ~= nil then
  342. tolua.setpeer(self.icon, nil)
  343. end
  344. self.icon = nil
  345. if tolua.getpeer(self.frame) ~= nil then
  346. tolua.setpeer(self.frame, nil)
  347. end
  348. self.frame = nil
  349. if tolua.getpeer(self.level) ~= nil then
  350. tolua.setpeer(self.level, nil)
  351. end
  352. self.level = nil
  353. if tolua.getpeer(self.textLv) ~= nil then
  354. tolua.setpeer(self.textLv, nil)
  355. end
  356. self.textLv = nil
  357. if tolua.getpeer(self.par) ~= nil then
  358. tolua.setpeer(self.par, nil)
  359. end
  360. self.par = nil
  361. if tolua.getpeer(self.cardPlus) ~= nil then
  362. tolua.setpeer(self.cardPlus, nil)
  363. end
  364. self.cardPlus = nil
  365. if tolua.getpeer(self.bgPlus) ~= nil then
  366. tolua.setpeer(self.bgPlus, nil)
  367. end
  368. self.bgPlus = nil
  369. if tolua.getpeer(self.slot1) ~= nil then
  370. tolua.setpeer(self.slot1, nil)
  371. end
  372. self.slot1 = nil
  373. if tolua.getpeer(self.card1) ~= nil then
  374. tolua.setpeer(self.card1, nil)
  375. end
  376. self.card1 = nil
  377. if tolua.getpeer(self.slot2) ~= nil then
  378. tolua.setpeer(self.slot2, nil)
  379. end
  380. self.slot2 = nil
  381. if tolua.getpeer(self.card2) ~= nil then
  382. tolua.setpeer(self.card2, nil)
  383. end
  384. self.card2 = nil
  385. if tolua.getpeer(self.slot3) ~= nil then
  386. tolua.setpeer(self.slot3, nil)
  387. end
  388. self.slot3 = nil
  389. if tolua.getpeer(self.card3) ~= nil then
  390. tolua.setpeer(self.card3, nil)
  391. end
  392. self.card3 = nil
  393. if tolua.getpeer(self.slot4) ~= nil then
  394. tolua.setpeer(self.slot4, nil)
  395. end
  396. self.slot4 = nil
  397. if tolua.getpeer(self.card4) ~= nil then
  398. tolua.setpeer(self.card4, nil)
  399. end
  400. self.card4 = nil
  401. if tolua.getpeer(self.equipFx) ~= nil then
  402. tolua.setpeer(self.equipFx, nil)
  403. end
  404. self.equipFx = nil
  405. if tolua.getpeer(self.mask) ~= nil then
  406. tolua.setpeer(self.mask, nil)
  407. end
  408. self.mask = nil
  409. if self.redPointItem.GenerateDestroy ~= nil then
  410. self.redPointItem:GenerateDestroy()
  411. end
  412. if tolua.getpeer(self.redPointItem) ~= nil then
  413. tolua.setpeer(self.redPointItem, nil)
  414. end
  415. self.redPointItem = nil
  416. self.transform = nil
  417. self.gameObject = nil
  418. self.inited = false
  419. end
  420. return EuipSlotItemView