IconPetItem_Generate.lua 13 KB

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