UICollectView_Generate.lua 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502
  1. ---@class UICollect__Generate_numexchage
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class UICollect__Generate_btnPlayRule
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public button UnityEngine.UI.Button
  7. ---@class UICollect__Generate_btnClose
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public button UnityEngine.UI.Button
  10. ---@class UICollect__Generate_lockCollection_text
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public uILocalizeScript UILocalizeScript
  13. ---@class UICollect__Generate_lockCollection
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public button UnityEngine.UI.Button
  16. ---@field public text UICollect__Generate_lockCollection_text
  17. ---@class UICollect__Generate_btnCollectionBook
  18. ---@field public gameObject UnityEngine.GameObject
  19. ---@field public button UnityEngine.UI.Button
  20. ---@class UICollect__Generate_lockPet_text
  21. ---@field public gameObject UnityEngine.GameObject
  22. ---@field public uILocalizeScript UILocalizeScript
  23. ---@class UICollect__Generate_lockPet
  24. ---@field public gameObject UnityEngine.GameObject
  25. ---@field public button UnityEngine.UI.Button
  26. ---@field public text UICollect__Generate_lockPet_text
  27. ---@class UICollect__Generate_btnPetBook
  28. ---@field public gameObject UnityEngine.GameObject
  29. ---@field public button UnityEngine.UI.Button
  30. ---@class UICollect__Generate_lockCard_text
  31. ---@field public gameObject UnityEngine.GameObject
  32. ---@field public text UnityEngine.UI.Text
  33. ---@class UICollect__Generate_lockCard
  34. ---@field public gameObject UnityEngine.GameObject
  35. ---@field public button UnityEngine.UI.Button
  36. ---@field public text UICollect__Generate_lockCard_text
  37. ---@class UICollect__Generate_btnCardBook
  38. ---@field public gameObject UnityEngine.GameObject
  39. ---@field public button UnityEngine.UI.Button
  40. ---@class UICollect__Generate_bookAnim
  41. ---@field public gameObject UnityEngine.GameObject
  42. ---@field public rectTransform UnityEngine.RectTransform
  43. ---@class UICollect__Generate_bookItem
  44. ---@field public gameObject UnityEngine.GameObject
  45. ---@field public rectTransform UnityEngine.RectTransform
  46. ---@class UICollect__Generate_window
  47. ---@field public gameObject UnityEngine.GameObject
  48. ---@field public animator UnityEngine.Animator
  49. ---@class UICollect__Generate_AnyBtn
  50. ---@field public gameObject UnityEngine.GameObject
  51. ---@field public button UnityEngine.UI.Button
  52. ---@class UICollect__Generate_uIAnimator
  53. ---@field public gameObject UnityEngine.GameObject
  54. ---@field public animator UnityEngine.Animator
  55. ---@class UICollect__Generate
  56. ---@field private gameObject UnityEngine.GameObject
  57. ---@field private transform UnityEngine.Transform
  58. ---@field private uIAnimator UICollect__Generate_uIAnimator
  59. ---@field private AnyBtn UICollect__Generate_AnyBtn
  60. ---@field private window UICollect__Generate_window
  61. ---@field private bookItem UICollect__Generate_bookItem
  62. ---@field private bookAnim UICollect__Generate_bookAnim
  63. ---@field private enterAnim UnityEngine.GameObject
  64. ---@field private btnCardBook UICollect__Generate_btnCardBook
  65. ---@field private lockCard UICollect__Generate_lockCard
  66. ---@field private btnPetBook UICollect__Generate_btnPetBook
  67. ---@field private lockPet UICollect__Generate_lockPet
  68. ---@field private btnCollectionBook UICollect__Generate_btnCollectionBook
  69. ---@field private lockCollection UICollect__Generate_lockCollection
  70. ---@field private btnClose UICollect__Generate_btnClose
  71. ---@field private btnPlayRule UICollect__Generate_btnPlayRule
  72. ---@field private myExchangeCards UnityEngine.GameObject
  73. ---@field private numexchage UICollect__Generate_numexchage
  74. ---@field private talkBox UnityEngine.GameObject
  75. local UICollectView = class("UICollectView", require("UIViewBase"))
  76. function UICollectView:ctor()
  77. end
  78. ---@private
  79. function UICollectView:SetActive(result)
  80. self.gameObject:SetActive(result)
  81. end
  82. ---@private
  83. function UICollectView:InitGenerate(Root, data)
  84. self.transform = Root
  85. self.inited = true
  86. if self.super.Init then
  87. self.super.Init(self)
  88. end
  89. local tmp
  90. self:InitGenerate__1(Root,data)
  91. self:InitGenerate__2(Root,data)
  92. self:InitGenerate__3(Root,data)
  93. self:InitGenerate__4(Root,data)
  94. self:InitGenerate__5(Root,data)
  95. self:InitGenerate__6(Root,data)
  96. self:InitGenerate__7(Root,data)
  97. self:InitGenerate__8(Root,data)
  98. self:InitGenerate__9(Root,data)
  99. self:InitGenerate__10(Root,data)
  100. self:InitGenerate__11(Root,data)
  101. self:InitGenerate__12(Root,data)
  102. self:InitGenerate__13(Root,data)
  103. self:InitGenerate__14(Root,data)
  104. self:InitGenerate__15(Root,data)
  105. self:InitGenerate__16(Root,data)
  106. self:InitGenerate__17(Root,data)
  107. self:InitGenerate__18(Root,data)
  108. self:InitGenerate__19(Root,data)
  109. self:InitGenerate__20(Root,data)
  110. end
  111. ---@private
  112. function UICollectView:InitGenerate__1(Root, data)
  113. --[[
  114. UIAnimator
  115. --]]
  116. local tmp = Root:Find("UIAnimator").gameObject
  117. if tolua.getpeer(tmp) == nil then
  118. tolua.setpeer(tmp, {})
  119. end
  120. self.uIAnimator = tmp
  121. tmp.animator = tmp:GetComponent(Enum.TypeInfo.Animator)
  122. tmp.animator.logWarnings = false
  123. end
  124. ---@private
  125. function UICollectView:InitGenerate__2(Root, data)
  126. --[[
  127. UIAnimator/Alpha
  128. --]]
  129. local tmp = Root:Find("UIAnimator/Alpha").gameObject
  130. if tolua.getpeer(tmp) == nil then
  131. tolua.setpeer(tmp, {})
  132. end
  133. self.AnyBtn = tmp
  134. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  135. end
  136. ---@private
  137. function UICollectView:InitGenerate__3(Root, data)
  138. --[[
  139. UIAnimator/Window
  140. --]]
  141. local tmp = Root:Find("UIAnimator/Window").gameObject
  142. if tolua.getpeer(tmp) == nil then
  143. tolua.setpeer(tmp, {})
  144. end
  145. self.window = tmp
  146. tmp.animator = tmp:GetComponent(Enum.TypeInfo.Animator)
  147. tmp.animator.logWarnings = false
  148. end
  149. ---@private
  150. function UICollectView:InitGenerate__4(Root, data)
  151. --[[
  152. UIAnimator/Window/BookItem
  153. --]]
  154. local tmp = Root:Find("UIAnimator/Window/BookItem").gameObject
  155. if tolua.getpeer(tmp) == nil then
  156. tolua.setpeer(tmp, {})
  157. end
  158. self.bookItem = CommonUtil.BindGridViewItem2LuaStatic("BookItem", tmp)
  159. self.bookItem.prefabName = "BookItem"
  160. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  161. end
  162. ---@private
  163. function UICollectView:InitGenerate__5(Root, data)
  164. --[[
  165. UIAnimator/Window/BookAnim
  166. --]]
  167. local tmp = Root:Find("UIAnimator/Window/BookAnim").gameObject
  168. if tolua.getpeer(tmp) == nil then
  169. tolua.setpeer(tmp, {})
  170. end
  171. self.bookAnim = tmp
  172. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  173. end
  174. ---@private
  175. function UICollectView:InitGenerate__6(Root, data)
  176. --[[
  177. UIAnimator/Window/EnterAnim
  178. --]]
  179. local tmp = Root:Find("UIAnimator/Window/EnterAnim").gameObject
  180. if tolua.getpeer(tmp) == nil then
  181. tolua.setpeer(tmp, {})
  182. end
  183. self.enterAnim = tmp
  184. end
  185. ---@private
  186. function UICollectView:InitGenerate__7(Root, data)
  187. --[[
  188. UIAnimator/Window/EnterAnim/Viewport/Content/BtnCardBook
  189. --]]
  190. local tmp = Root:Find("UIAnimator/Window/EnterAnim/Viewport/Content/BtnCardBook").gameObject
  191. if tolua.getpeer(tmp) == nil then
  192. tolua.setpeer(tmp, {})
  193. end
  194. self.btnCardBook = tmp
  195. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  196. end
  197. ---@private
  198. function UICollectView:InitGenerate__8(Root, data)
  199. --[[
  200. UIAnimator/Window/EnterAnim/Viewport/Content/BtnCardBook/LockCard
  201. --]]
  202. local tmp = Root:Find("UIAnimator/Window/EnterAnim/Viewport/Content/BtnCardBook/LockCard").gameObject
  203. if tolua.getpeer(tmp) == nil then
  204. tolua.setpeer(tmp, {})
  205. end
  206. self.lockCard = tmp
  207. self.lockCard:SetActive(false)
  208. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  209. end
  210. ---@private
  211. function UICollectView:InitGenerate__9(Root, data)
  212. --[[
  213. UIAnimator/Window/EnterAnim/Viewport/Content/BtnCardBook/LockCard/Label/Text
  214. --]]
  215. local tmp = Root:Find("UIAnimator/Window/EnterAnim/Viewport/Content/BtnCardBook/LockCard/Label/Text").gameObject
  216. if tolua.getpeer(tmp) == nil then
  217. tolua.setpeer(tmp, {})
  218. end
  219. self.lockCard.text = tmp
  220. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  221. end
  222. ---@private
  223. function UICollectView:InitGenerate__10(Root, data)
  224. --[[
  225. UIAnimator/Window/EnterAnim/Viewport/Content/BtnPetBook
  226. --]]
  227. local tmp = Root:Find("UIAnimator/Window/EnterAnim/Viewport/Content/BtnPetBook").gameObject
  228. if tolua.getpeer(tmp) == nil then
  229. tolua.setpeer(tmp, {})
  230. end
  231. self.btnPetBook = tmp
  232. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  233. end
  234. ---@private
  235. function UICollectView:InitGenerate__11(Root, data)
  236. --[[
  237. UIAnimator/Window/EnterAnim/Viewport/Content/BtnPetBook/LockPet
  238. --]]
  239. local tmp = Root:Find("UIAnimator/Window/EnterAnim/Viewport/Content/BtnPetBook/LockPet").gameObject
  240. if tolua.getpeer(tmp) == nil then
  241. tolua.setpeer(tmp, {})
  242. end
  243. self.lockPet = tmp
  244. self.lockPet:SetActive(false)
  245. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  246. end
  247. ---@private
  248. function UICollectView:InitGenerate__12(Root, data)
  249. --[[
  250. UIAnimator/Window/EnterAnim/Viewport/Content/BtnPetBook/LockPet/Label/Text
  251. --]]
  252. local tmp = Root:Find("UIAnimator/Window/EnterAnim/Viewport/Content/BtnPetBook/LockPet/Label/Text").gameObject
  253. if tolua.getpeer(tmp) == nil then
  254. tolua.setpeer(tmp, {})
  255. end
  256. self.lockPet.text = tmp
  257. tmp.uILocalizeScript = tmp:GetComponent(Enum.TypeInfo.UILocalizeScript)
  258. end
  259. ---@private
  260. function UICollectView:InitGenerate__13(Root, data)
  261. --[[
  262. UIAnimator/Window/EnterAnim/Viewport/Content/BtnCollectionBook
  263. --]]
  264. local tmp = Root:Find("UIAnimator/Window/EnterAnim/Viewport/Content/BtnCollectionBook").gameObject
  265. if tolua.getpeer(tmp) == nil then
  266. tolua.setpeer(tmp, {})
  267. end
  268. self.btnCollectionBook = tmp
  269. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  270. end
  271. ---@private
  272. function UICollectView:InitGenerate__14(Root, data)
  273. --[[
  274. UIAnimator/Window/EnterAnim/Viewport/Content/BtnCollectionBook/LockCollection
  275. --]]
  276. local tmp = Root:Find("UIAnimator/Window/EnterAnim/Viewport/Content/BtnCollectionBook/LockCollection").gameObject
  277. if tolua.getpeer(tmp) == nil then
  278. tolua.setpeer(tmp, {})
  279. end
  280. self.lockCollection = tmp
  281. self.lockCollection:SetActive(false)
  282. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  283. end
  284. ---@private
  285. function UICollectView:InitGenerate__15(Root, data)
  286. --[[
  287. UIAnimator/Window/EnterAnim/Viewport/Content/BtnCollectionBook/LockCollection/Label/Text
  288. --]]
  289. local tmp = Root:Find("UIAnimator/Window/EnterAnim/Viewport/Content/BtnCollectionBook/LockCollection/Label/Text").gameObject
  290. if tolua.getpeer(tmp) == nil then
  291. tolua.setpeer(tmp, {})
  292. end
  293. self.lockCollection.text = tmp
  294. tmp.uILocalizeScript = tmp:GetComponent(Enum.TypeInfo.UILocalizeScript)
  295. end
  296. ---@private
  297. function UICollectView:InitGenerate__16(Root, data)
  298. --[[
  299. UIAnimator/Window/BottomAnim/BtnClose
  300. --]]
  301. local tmp = Root:Find("UIAnimator/Window/BottomAnim/BtnClose").gameObject
  302. if tolua.getpeer(tmp) == nil then
  303. tolua.setpeer(tmp, {})
  304. end
  305. self.btnClose = tmp
  306. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  307. end
  308. ---@private
  309. function UICollectView:InitGenerate__17(Root, data)
  310. --[[
  311. UIAnimator/Window/TopView/BtnPlayRule
  312. --]]
  313. local tmp = Root:Find("UIAnimator/Window/TopView/BtnPlayRule").gameObject
  314. if tolua.getpeer(tmp) == nil then
  315. tolua.setpeer(tmp, {})
  316. end
  317. self.btnPlayRule = tmp
  318. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  319. end
  320. ---@private
  321. function UICollectView:InitGenerate__18(Root, data)
  322. --[[
  323. UIAnimator/Window/TopView/MyExchangeCards
  324. --]]
  325. local tmp = Root:Find("UIAnimator/Window/TopView/MyExchangeCards").gameObject
  326. if tolua.getpeer(tmp) == nil then
  327. tolua.setpeer(tmp, {})
  328. end
  329. self.myExchangeCards = tmp
  330. self.myExchangeCards:SetActive(false)
  331. end
  332. ---@private
  333. function UICollectView:InitGenerate__19(Root, data)
  334. --[[
  335. UIAnimator/Window/TopView/MyExchangeCards/numexchage
  336. --]]
  337. local tmp = Root:Find("UIAnimator/Window/TopView/MyExchangeCards/numexchage").gameObject
  338. if tolua.getpeer(tmp) == nil then
  339. tolua.setpeer(tmp, {})
  340. end
  341. self.numexchage = tmp
  342. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  343. end
  344. ---@private
  345. function UICollectView:InitGenerate__20(Root, data)
  346. --[[
  347. UIAnimator/Window/TopView/TalkBox
  348. --]]
  349. local tmp = Root:Find("UIAnimator/Window/TopView/TalkBox").gameObject
  350. if tolua.getpeer(tmp) == nil then
  351. tolua.setpeer(tmp, {})
  352. end
  353. self.talkBox = tmp
  354. end
  355. ---@private
  356. function UICollectView:GenerateDestroy()
  357. if tolua.getpeer(self.lockCollection.text) ~= nil then
  358. tolua.setpeer(self.lockCollection.text, nil)
  359. end
  360. if tolua.getpeer(self.lockPet.text) ~= nil then
  361. tolua.setpeer(self.lockPet.text, nil)
  362. end
  363. if tolua.getpeer(self.lockCard.text) ~= nil then
  364. tolua.setpeer(self.lockCard.text, nil)
  365. end
  366. if tolua.getpeer(self.uIAnimator) ~= nil then
  367. tolua.setpeer(self.uIAnimator, nil)
  368. end
  369. self.uIAnimator = nil
  370. if tolua.getpeer(self.AnyBtn) ~= nil then
  371. tolua.setpeer(self.AnyBtn, nil)
  372. end
  373. self.AnyBtn = nil
  374. if tolua.getpeer(self.window) ~= nil then
  375. tolua.setpeer(self.window, nil)
  376. end
  377. self.window = nil
  378. if self.bookItem.GenerateDestroy ~= nil then
  379. self.bookItem:GenerateDestroy()
  380. end
  381. if tolua.getpeer(self.bookItem) ~= nil then
  382. tolua.setpeer(self.bookItem, nil)
  383. end
  384. self.bookItem = nil
  385. if tolua.getpeer(self.bookAnim) ~= nil then
  386. tolua.setpeer(self.bookAnim, nil)
  387. end
  388. self.bookAnim = nil
  389. if tolua.getpeer(self.enterAnim) ~= nil then
  390. tolua.setpeer(self.enterAnim, nil)
  391. end
  392. self.enterAnim = nil
  393. if tolua.getpeer(self.btnCardBook) ~= nil then
  394. tolua.setpeer(self.btnCardBook, nil)
  395. end
  396. self.btnCardBook = nil
  397. if tolua.getpeer(self.lockCard) ~= nil then
  398. tolua.setpeer(self.lockCard, nil)
  399. end
  400. self.lockCard = nil
  401. if tolua.getpeer(self.btnPetBook) ~= nil then
  402. tolua.setpeer(self.btnPetBook, nil)
  403. end
  404. self.btnPetBook = nil
  405. if tolua.getpeer(self.lockPet) ~= nil then
  406. tolua.setpeer(self.lockPet, nil)
  407. end
  408. self.lockPet = nil
  409. if tolua.getpeer(self.btnCollectionBook) ~= nil then
  410. tolua.setpeer(self.btnCollectionBook, nil)
  411. end
  412. self.btnCollectionBook = nil
  413. if tolua.getpeer(self.lockCollection) ~= nil then
  414. tolua.setpeer(self.lockCollection, nil)
  415. end
  416. self.lockCollection = nil
  417. if tolua.getpeer(self.btnClose) ~= nil then
  418. tolua.setpeer(self.btnClose, nil)
  419. end
  420. self.btnClose = nil
  421. if tolua.getpeer(self.btnPlayRule) ~= nil then
  422. tolua.setpeer(self.btnPlayRule, nil)
  423. end
  424. self.btnPlayRule = nil
  425. if tolua.getpeer(self.myExchangeCards) ~= nil then
  426. tolua.setpeer(self.myExchangeCards, nil)
  427. end
  428. self.myExchangeCards = nil
  429. if tolua.getpeer(self.numexchage) ~= nil then
  430. tolua.setpeer(self.numexchage, nil)
  431. end
  432. self.numexchage = nil
  433. if tolua.getpeer(self.talkBox) ~= nil then
  434. tolua.setpeer(self.talkBox, nil)
  435. end
  436. self.talkBox = nil
  437. self.transform = nil
  438. self.gameObject = nil
  439. self.inited = false
  440. end
  441. return UICollectView