CardEquipItem_Generate.lua 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517
  1. ---@class CardEquipItem__Generate_btnChange
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public button UnityEngine.UI.Button
  4. ---@class CardEquipItem__Generate_btnEquip
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public button UnityEngine.UI.Button
  7. ---@class CardEquipItem__Generate_slot4_check
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public image UnityEngine.UI.Image
  10. ---@class CardEquipItem__Generate_slot4_shadow
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public image UnityEngine.UI.Image
  13. ---@class CardEquipItem__Generate_slot4
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public shadow CardEquipItem__Generate_slot4_shadow
  16. ---@field public check CardEquipItem__Generate_slot4_check
  17. ---@class CardEquipItem__Generate_slot3_check
  18. ---@field public gameObject UnityEngine.GameObject
  19. ---@field public image UnityEngine.UI.Image
  20. ---@class CardEquipItem__Generate_slot3_shadow
  21. ---@field public gameObject UnityEngine.GameObject
  22. ---@field public image UnityEngine.UI.Image
  23. ---@class CardEquipItem__Generate_slot3
  24. ---@field public gameObject UnityEngine.GameObject
  25. ---@field public shadow CardEquipItem__Generate_slot3_shadow
  26. ---@field public check CardEquipItem__Generate_slot3_check
  27. ---@class CardEquipItem__Generate_slot2_check
  28. ---@field public gameObject UnityEngine.GameObject
  29. ---@field public image UnityEngine.UI.Image
  30. ---@class CardEquipItem__Generate_slot2_shadow
  31. ---@field public gameObject UnityEngine.GameObject
  32. ---@field public image UnityEngine.UI.Image
  33. ---@class CardEquipItem__Generate_slot2
  34. ---@field public gameObject UnityEngine.GameObject
  35. ---@field public shadow CardEquipItem__Generate_slot2_shadow
  36. ---@field public check CardEquipItem__Generate_slot2_check
  37. ---@class CardEquipItem__Generate_slot1_check
  38. ---@field public gameObject UnityEngine.GameObject
  39. ---@field public image UnityEngine.UI.Image
  40. ---@class CardEquipItem__Generate_slot1_shadow
  41. ---@field public gameObject UnityEngine.GameObject
  42. ---@field public image UnityEngine.UI.Image
  43. ---@class CardEquipItem__Generate_slot1
  44. ---@field public gameObject UnityEngine.GameObject
  45. ---@field public shadow CardEquipItem__Generate_slot1_shadow
  46. ---@field public check CardEquipItem__Generate_slot1_check
  47. ---@class CardEquipItem__Generate_equipCards
  48. ---@field public gameObject UnityEngine.GameObject
  49. ---@field public uILocalizeScript UILocalizeScript
  50. ---@class CardEquipItem__Generate_belong
  51. ---@field public gameObject UnityEngine.GameObject
  52. ---@field public text UnityEngine.UI.Text
  53. ---@class CardEquipItem__Generate_jobIcon
  54. ---@field public gameObject UnityEngine.GameObject
  55. ---@field public image UnityEngine.UI.Image
  56. ---@class CardEquipItem__Generate_textName
  57. ---@field public gameObject UnityEngine.GameObject
  58. ---@field public text UnityEngine.UI.Text
  59. ---@class CardEquipItem__Generate_iconItem
  60. ---@field public gameObject UnityEngine.GameObject
  61. ---@field public rectTransform UnityEngine.RectTransform
  62. ---@field public layoutElement UnityEngine.UI.LayoutElement
  63. ---@class CardEquipItem__Generate
  64. ---@field private gameObject UnityEngine.GameObject
  65. ---@field private transform UnityEngine.Transform
  66. ---@field private contentItem UnityEngine.GameObject
  67. ---@field private iconItem CardEquipItem__Generate_iconItem
  68. ---@field private textName CardEquipItem__Generate_textName
  69. ---@field private jobIcon CardEquipItem__Generate_jobIcon
  70. ---@field private belong CardEquipItem__Generate_belong
  71. ---@field private equipCards CardEquipItem__Generate_equipCards
  72. ---@field private slot1 CardEquipItem__Generate_slot1
  73. ---@field private slot2 CardEquipItem__Generate_slot2
  74. ---@field private slot3 CardEquipItem__Generate_slot3
  75. ---@field private slot4 CardEquipItem__Generate_slot4
  76. ---@field private btnEquip CardEquipItem__Generate_btnEquip
  77. ---@field private btnChange CardEquipItem__Generate_btnChange
  78. ---@field private labelRecommend UnityEngine.GameObject
  79. local CardEquipItemView = class("CardEquipItemView")
  80. function CardEquipItemView:ctor()
  81. end
  82. ---@private
  83. function CardEquipItemView:SetActive(result)
  84. self.gameObject:SetActive(result)
  85. end
  86. ---@private
  87. function CardEquipItemView:InitGenerate(Root, data)
  88. self.transform = Root
  89. self.inited = true
  90. local tmp
  91. self:InitGenerate__1(Root,data)
  92. self:InitGenerate__2(Root,data)
  93. self:InitGenerate__3(Root,data)
  94. self:InitGenerate__4(Root,data)
  95. self:InitGenerate__5(Root,data)
  96. self:InitGenerate__6(Root,data)
  97. self:InitGenerate__7(Root,data)
  98. self:InitGenerate__8(Root,data)
  99. self:InitGenerate__9(Root,data)
  100. self:InitGenerate__10(Root,data)
  101. self:InitGenerate__11(Root,data)
  102. self:InitGenerate__12(Root,data)
  103. self:InitGenerate__13(Root,data)
  104. self:InitGenerate__14(Root,data)
  105. self:InitGenerate__15(Root,data)
  106. self:InitGenerate__16(Root,data)
  107. self:InitGenerate__17(Root,data)
  108. self:InitGenerate__18(Root,data)
  109. self:InitGenerate__19(Root,data)
  110. self:InitGenerate__20(Root,data)
  111. self:InitGenerate__21(Root,data)
  112. self:InitGenerate__22(Root,data)
  113. end
  114. ---@private
  115. function CardEquipItemView:InitGenerate__1(Root, data)
  116. --[[
  117. Root
  118. --]]
  119. end
  120. ---@private
  121. function CardEquipItemView:InitGenerate__2(Root, data)
  122. --[[
  123. ContentItem
  124. --]]
  125. local tmp = Root:Find("ContentItem").gameObject
  126. if tolua.getpeer(tmp) == nil then
  127. tolua.setpeer(tmp, {})
  128. end
  129. self.contentItem = tmp
  130. end
  131. ---@private
  132. function CardEquipItemView:InitGenerate__3(Root, data)
  133. --[[
  134. ContentItem/IconItem
  135. --]]
  136. local tmp = Root:Find("ContentItem/IconItem").gameObject
  137. if tolua.getpeer(tmp) == nil then
  138. tolua.setpeer(tmp, {})
  139. end
  140. self.iconItem = CommonUtil.BindGridViewItem2LuaStatic("IconItem", tmp)
  141. self.iconItem.prefabName = "IconItem"
  142. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  143. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  144. end
  145. ---@private
  146. function CardEquipItemView:InitGenerate__4(Root, data)
  147. --[[
  148. Texts/TextName
  149. --]]
  150. local tmp = Root:Find("Texts/TextName").gameObject
  151. if tolua.getpeer(tmp) == nil then
  152. tolua.setpeer(tmp, {})
  153. end
  154. self.textName = tmp
  155. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  156. end
  157. ---@private
  158. function CardEquipItemView:InitGenerate__5(Root, data)
  159. --[[
  160. Texts/Type1/JobIcon
  161. --]]
  162. local tmp = Root:Find("Texts/Type1/JobIcon").gameObject
  163. if tolua.getpeer(tmp) == nil then
  164. tolua.setpeer(tmp, {})
  165. end
  166. self.jobIcon = tmp
  167. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  168. end
  169. ---@private
  170. function CardEquipItemView:InitGenerate__6(Root, data)
  171. --[[
  172. Texts/Type1/Belong
  173. --]]
  174. local tmp = Root:Find("Texts/Type1/Belong").gameObject
  175. if tolua.getpeer(tmp) == nil then
  176. tolua.setpeer(tmp, {})
  177. end
  178. self.belong = tmp
  179. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  180. end
  181. ---@private
  182. function CardEquipItemView:InitGenerate__7(Root, data)
  183. --[[
  184. Texts/Type2/EquipCards
  185. --]]
  186. local tmp = Root:Find("Texts/Type2/EquipCards").gameObject
  187. if tolua.getpeer(tmp) == nil then
  188. tolua.setpeer(tmp, {})
  189. end
  190. self.equipCards = tmp
  191. tmp.uILocalizeScript = tmp:GetComponent(Enum.TypeInfo.UILocalizeScript)
  192. end
  193. ---@private
  194. function CardEquipItemView:InitGenerate__8(Root, data)
  195. --[[
  196. Texts/Type2/Cards/Slot1
  197. --]]
  198. local tmp = Root:Find("Texts/Type2/Cards/Slot1").gameObject
  199. if tolua.getpeer(tmp) == nil then
  200. tolua.setpeer(tmp, {})
  201. end
  202. self.slot1 = tmp
  203. end
  204. ---@private
  205. function CardEquipItemView:InitGenerate__9(Root, data)
  206. --[[
  207. Texts/Type2/Cards/Slot1/shadow
  208. --]]
  209. local tmp = Root:Find("Texts/Type2/Cards/Slot1/shadow").gameObject
  210. if tolua.getpeer(tmp) == nil then
  211. tolua.setpeer(tmp, {})
  212. end
  213. self.slot1.shadow = tmp
  214. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  215. end
  216. ---@private
  217. function CardEquipItemView:InitGenerate__10(Root, data)
  218. --[[
  219. Texts/Type2/Cards/Slot1/Check
  220. --]]
  221. local tmp = Root:Find("Texts/Type2/Cards/Slot1/Check").gameObject
  222. if tolua.getpeer(tmp) == nil then
  223. tolua.setpeer(tmp, {})
  224. end
  225. self.slot1.check = tmp
  226. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  227. end
  228. ---@private
  229. function CardEquipItemView:InitGenerate__11(Root, data)
  230. --[[
  231. Texts/Type2/Cards/Slot2
  232. --]]
  233. local tmp = Root:Find("Texts/Type2/Cards/Slot2").gameObject
  234. if tolua.getpeer(tmp) == nil then
  235. tolua.setpeer(tmp, {})
  236. end
  237. self.slot2 = tmp
  238. end
  239. ---@private
  240. function CardEquipItemView:InitGenerate__12(Root, data)
  241. --[[
  242. Texts/Type2/Cards/Slot2/shadow
  243. --]]
  244. local tmp = Root:Find("Texts/Type2/Cards/Slot2/shadow").gameObject
  245. if tolua.getpeer(tmp) == nil then
  246. tolua.setpeer(tmp, {})
  247. end
  248. self.slot2.shadow = tmp
  249. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  250. end
  251. ---@private
  252. function CardEquipItemView:InitGenerate__13(Root, data)
  253. --[[
  254. Texts/Type2/Cards/Slot2/Check
  255. --]]
  256. local tmp = Root:Find("Texts/Type2/Cards/Slot2/Check").gameObject
  257. if tolua.getpeer(tmp) == nil then
  258. tolua.setpeer(tmp, {})
  259. end
  260. self.slot2.check = tmp
  261. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  262. end
  263. ---@private
  264. function CardEquipItemView:InitGenerate__14(Root, data)
  265. --[[
  266. Texts/Type2/Cards/Slot3
  267. --]]
  268. local tmp = Root:Find("Texts/Type2/Cards/Slot3").gameObject
  269. if tolua.getpeer(tmp) == nil then
  270. tolua.setpeer(tmp, {})
  271. end
  272. self.slot3 = tmp
  273. end
  274. ---@private
  275. function CardEquipItemView:InitGenerate__15(Root, data)
  276. --[[
  277. Texts/Type2/Cards/Slot3/shadow
  278. --]]
  279. local tmp = Root:Find("Texts/Type2/Cards/Slot3/shadow").gameObject
  280. if tolua.getpeer(tmp) == nil then
  281. tolua.setpeer(tmp, {})
  282. end
  283. self.slot3.shadow = tmp
  284. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  285. end
  286. ---@private
  287. function CardEquipItemView:InitGenerate__16(Root, data)
  288. --[[
  289. Texts/Type2/Cards/Slot3/Check
  290. --]]
  291. local tmp = Root:Find("Texts/Type2/Cards/Slot3/Check").gameObject
  292. if tolua.getpeer(tmp) == nil then
  293. tolua.setpeer(tmp, {})
  294. end
  295. self.slot3.check = tmp
  296. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  297. end
  298. ---@private
  299. function CardEquipItemView:InitGenerate__17(Root, data)
  300. --[[
  301. Texts/Type2/Cards/Slot4
  302. --]]
  303. local tmp = Root:Find("Texts/Type2/Cards/Slot4").gameObject
  304. if tolua.getpeer(tmp) == nil then
  305. tolua.setpeer(tmp, {})
  306. end
  307. self.slot4 = tmp
  308. end
  309. ---@private
  310. function CardEquipItemView:InitGenerate__18(Root, data)
  311. --[[
  312. Texts/Type2/Cards/Slot4/shadow
  313. --]]
  314. local tmp = Root:Find("Texts/Type2/Cards/Slot4/shadow").gameObject
  315. if tolua.getpeer(tmp) == nil then
  316. tolua.setpeer(tmp, {})
  317. end
  318. self.slot4.shadow = tmp
  319. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  320. end
  321. ---@private
  322. function CardEquipItemView:InitGenerate__19(Root, data)
  323. --[[
  324. Texts/Type2/Cards/Slot4/Check
  325. --]]
  326. local tmp = Root:Find("Texts/Type2/Cards/Slot4/Check").gameObject
  327. if tolua.getpeer(tmp) == nil then
  328. tolua.setpeer(tmp, {})
  329. end
  330. self.slot4.check = tmp
  331. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  332. end
  333. ---@private
  334. function CardEquipItemView:InitGenerate__20(Root, data)
  335. --[[
  336. BtnEquip
  337. --]]
  338. local tmp = Root:Find("BtnEquip").gameObject
  339. if tolua.getpeer(tmp) == nil then
  340. tolua.setpeer(tmp, {})
  341. end
  342. self.btnEquip = tmp
  343. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  344. end
  345. ---@private
  346. function CardEquipItemView:InitGenerate__21(Root, data)
  347. --[[
  348. BtnChange
  349. --]]
  350. local tmp = Root:Find("BtnChange").gameObject
  351. if tolua.getpeer(tmp) == nil then
  352. tolua.setpeer(tmp, {})
  353. end
  354. self.btnChange = tmp
  355. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  356. end
  357. ---@private
  358. function CardEquipItemView:InitGenerate__22(Root, data)
  359. --[[
  360. LabelRecommend
  361. --]]
  362. local tmp = Root:Find("LabelRecommend").gameObject
  363. if tolua.getpeer(tmp) == nil then
  364. tolua.setpeer(tmp, {})
  365. end
  366. self.labelRecommend = tmp
  367. end
  368. ---@private
  369. function CardEquipItemView:GenerateDestroy()
  370. if tolua.getpeer(self.slot4.check) ~= nil then
  371. tolua.setpeer(self.slot4.check, nil)
  372. end
  373. if tolua.getpeer(self.slot4.shadow) ~= nil then
  374. tolua.setpeer(self.slot4.shadow, nil)
  375. end
  376. if tolua.getpeer(self.slot3.check) ~= nil then
  377. tolua.setpeer(self.slot3.check, nil)
  378. end
  379. if tolua.getpeer(self.slot3.shadow) ~= nil then
  380. tolua.setpeer(self.slot3.shadow, nil)
  381. end
  382. if tolua.getpeer(self.slot2.check) ~= nil then
  383. tolua.setpeer(self.slot2.check, nil)
  384. end
  385. if tolua.getpeer(self.slot2.shadow) ~= nil then
  386. tolua.setpeer(self.slot2.shadow, nil)
  387. end
  388. if tolua.getpeer(self.slot1.check) ~= nil then
  389. tolua.setpeer(self.slot1.check, nil)
  390. end
  391. if tolua.getpeer(self.slot1.shadow) ~= nil then
  392. tolua.setpeer(self.slot1.shadow, nil)
  393. end
  394. if tolua.getpeer(self.contentItem) ~= nil then
  395. tolua.setpeer(self.contentItem, nil)
  396. end
  397. self.contentItem = nil
  398. if self.iconItem.GenerateDestroy ~= nil then
  399. self.iconItem:GenerateDestroy()
  400. end
  401. if tolua.getpeer(self.iconItem) ~= nil then
  402. tolua.setpeer(self.iconItem, nil)
  403. end
  404. self.iconItem = nil
  405. if tolua.getpeer(self.textName) ~= nil then
  406. tolua.setpeer(self.textName, nil)
  407. end
  408. self.textName = nil
  409. if tolua.getpeer(self.jobIcon) ~= nil then
  410. tolua.setpeer(self.jobIcon, nil)
  411. end
  412. self.jobIcon = nil
  413. if tolua.getpeer(self.belong) ~= nil then
  414. tolua.setpeer(self.belong, nil)
  415. end
  416. self.belong = nil
  417. if tolua.getpeer(self.equipCards) ~= nil then
  418. tolua.setpeer(self.equipCards, nil)
  419. end
  420. self.equipCards = nil
  421. if tolua.getpeer(self.slot1) ~= nil then
  422. tolua.setpeer(self.slot1, nil)
  423. end
  424. self.slot1 = nil
  425. if tolua.getpeer(self.slot2) ~= nil then
  426. tolua.setpeer(self.slot2, nil)
  427. end
  428. self.slot2 = nil
  429. if tolua.getpeer(self.slot3) ~= nil then
  430. tolua.setpeer(self.slot3, nil)
  431. end
  432. self.slot3 = nil
  433. if tolua.getpeer(self.slot4) ~= nil then
  434. tolua.setpeer(self.slot4, nil)
  435. end
  436. self.slot4 = nil
  437. if tolua.getpeer(self.btnEquip) ~= nil then
  438. tolua.setpeer(self.btnEquip, nil)
  439. end
  440. self.btnEquip = nil
  441. if tolua.getpeer(self.btnChange) ~= nil then
  442. tolua.setpeer(self.btnChange, nil)
  443. end
  444. self.btnChange = nil
  445. if tolua.getpeer(self.labelRecommend) ~= nil then
  446. tolua.setpeer(self.labelRecommend, nil)
  447. end
  448. self.labelRecommend = nil
  449. self.transform = nil
  450. self.gameObject = nil
  451. self.inited = false
  452. end
  453. return CardEquipItemView