CardSlotItem_Generate.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. ---@class CardSlotItem__Generate_lvLocked
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class CardSlotItem__Generate_nameTextMVP
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public text UnityEngine.UI.Text
  7. ---@field public uILocalizeScript UILocalizeScript
  8. ---@class CardSlotItem__Generate_nameTextMini
  9. ---@field public gameObject UnityEngine.GameObject
  10. ---@field public text UnityEngine.UI.Text
  11. ---@field public uILocalizeScript UILocalizeScript
  12. ---@class CardSlotItem__Generate_nameTextNormal
  13. ---@field public gameObject UnityEngine.GameObject
  14. ---@field public text UnityEngine.UI.Text
  15. ---@field public uILocalizeScript UILocalizeScript
  16. ---@class CardSlotItem__Generate_cardName
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public owned UnityEngine.GameObject
  19. ---@field public unowned UnityEngine.GameObject
  20. ---@field public locked UnityEngine.GameObject
  21. ---@class CardSlotItem__Generate_cardIcon_unowned_icon
  22. ---@field public gameObject UnityEngine.GameObject
  23. ---@field public button UnityEngine.UI.Button
  24. ---@class CardSlotItem__Generate_cardIcon_unowned
  25. ---@field public gameObject UnityEngine.GameObject
  26. ---@field public icon CardSlotItem__Generate_cardIcon_unowned_icon
  27. ---@class CardSlotItem__Generate_iconItem
  28. ---@field public gameObject UnityEngine.GameObject
  29. ---@field public rectTransform UnityEngine.RectTransform
  30. ---@field public layoutElement UnityEngine.UI.LayoutElement
  31. ---@class CardSlotItem__Generate_cardIcon
  32. ---@field public gameObject UnityEngine.GameObject
  33. ---@field public owned UnityEngine.GameObject
  34. ---@field public unowned CardSlotItem__Generate_cardIcon_unowned
  35. ---@field public locked UnityEngine.GameObject
  36. ---@class CardSlotItem__Generate
  37. ---@field private gameObject UnityEngine.GameObject
  38. ---@field private transform UnityEngine.Transform
  39. ---@field private cardIcon CardSlotItem__Generate_cardIcon
  40. ---@field private iconItem CardSlotItem__Generate_iconItem
  41. ---@field private cardName CardSlotItem__Generate_cardName
  42. ---@field private normal UnityEngine.GameObject
  43. ---@field private nameTextNormal CardSlotItem__Generate_nameTextNormal
  44. ---@field private mini UnityEngine.GameObject
  45. ---@field private nameTextMini CardSlotItem__Generate_nameTextMini
  46. ---@field private mVP UnityEngine.GameObject
  47. ---@field private nameTextMVP CardSlotItem__Generate_nameTextMVP
  48. ---@field private bg UnityEngine.GameObject
  49. ---@field private noCard UnityEngine.GameObject
  50. ---@field private lvLocked CardSlotItem__Generate_lvLocked
  51. ---@field private grid UnityEngine.GameObject
  52. local CardSlotItemView = class("CardSlotItemView")
  53. function CardSlotItemView:ctor()
  54. end
  55. ---@private
  56. function CardSlotItemView:SetActive(result)
  57. self.gameObject:SetActive(result)
  58. end
  59. ---@private
  60. function CardSlotItemView:InitGenerate(Root, data)
  61. self.transform = Root
  62. self.inited = true
  63. local tmp
  64. self:InitGenerate__1(Root,data)
  65. self:InitGenerate__2(Root,data)
  66. self:InitGenerate__3(Root,data)
  67. self:InitGenerate__4(Root,data)
  68. self:InitGenerate__5(Root,data)
  69. self:InitGenerate__6(Root,data)
  70. self:InitGenerate__7(Root,data)
  71. self:InitGenerate__8(Root,data)
  72. self:InitGenerate__9(Root,data)
  73. self:InitGenerate__10(Root,data)
  74. self:InitGenerate__11(Root,data)
  75. self:InitGenerate__12(Root,data)
  76. self:InitGenerate__13(Root,data)
  77. self:InitGenerate__14(Root,data)
  78. self:InitGenerate__15(Root,data)
  79. self:InitGenerate__16(Root,data)
  80. self:InitGenerate__17(Root,data)
  81. self:InitGenerate__18(Root,data)
  82. self:InitGenerate__19(Root,data)
  83. self:InitGenerate__20(Root,data)
  84. self:InitGenerate__21(Root,data)
  85. end
  86. ---@private
  87. function CardSlotItemView:InitGenerate__1(Root, data)
  88. --[[
  89. Root
  90. --]]
  91. end
  92. ---@private
  93. function CardSlotItemView:InitGenerate__2(Root, data)
  94. --[[
  95. CardIcon
  96. --]]
  97. local tmp = Root:Find("CardIcon").gameObject
  98. if tolua.getpeer(tmp) == nil then
  99. tolua.setpeer(tmp, {})
  100. end
  101. self.cardIcon = tmp
  102. end
  103. ---@private
  104. function CardSlotItemView:InitGenerate__3(Root, data)
  105. --[[
  106. CardIcon/Owned
  107. --]]
  108. local tmp = Root:Find("CardIcon/Owned").gameObject
  109. if tolua.getpeer(tmp) == nil then
  110. tolua.setpeer(tmp, {})
  111. end
  112. self.cardIcon.owned = tmp
  113. end
  114. ---@private
  115. function CardSlotItemView:InitGenerate__4(Root, data)
  116. --[[
  117. CardIcon/Owned/IconItem
  118. --]]
  119. local tmp = Root:Find("CardIcon/Owned/IconItem").gameObject
  120. if tolua.getpeer(tmp) == nil then
  121. tolua.setpeer(tmp, {})
  122. end
  123. self.iconItem = CommonUtil.BindGridViewItem2LuaStatic("IconItem", tmp)
  124. self.iconItem.prefabName = "IconItem"
  125. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  126. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  127. end
  128. ---@private
  129. function CardSlotItemView:InitGenerate__5(Root, data)
  130. --[[
  131. CardIcon/Unowned
  132. --]]
  133. local tmp = Root:Find("CardIcon/Unowned").gameObject
  134. if tolua.getpeer(tmp) == nil then
  135. tolua.setpeer(tmp, {})
  136. end
  137. self.cardIcon.unowned = tmp
  138. end
  139. ---@private
  140. function CardSlotItemView:InitGenerate__6(Root, data)
  141. --[[
  142. CardIcon/Unowned/icon
  143. --]]
  144. local tmp = Root:Find("CardIcon/Unowned/icon").gameObject
  145. if tolua.getpeer(tmp) == nil then
  146. tolua.setpeer(tmp, {})
  147. end
  148. self.cardIcon.unowned.icon = tmp
  149. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  150. end
  151. ---@private
  152. function CardSlotItemView:InitGenerate__7(Root, data)
  153. --[[
  154. CardIcon/Locked
  155. --]]
  156. local tmp = Root:Find("CardIcon/Locked").gameObject
  157. if tolua.getpeer(tmp) == nil then
  158. tolua.setpeer(tmp, {})
  159. end
  160. self.cardIcon.locked = tmp
  161. end
  162. ---@private
  163. function CardSlotItemView:InitGenerate__8(Root, data)
  164. --[[
  165. CardName
  166. --]]
  167. local tmp = Root:Find("CardName").gameObject
  168. if tolua.getpeer(tmp) == nil then
  169. tolua.setpeer(tmp, {})
  170. end
  171. self.cardName = tmp
  172. end
  173. ---@private
  174. function CardSlotItemView:InitGenerate__9(Root, data)
  175. --[[
  176. CardName/Owned
  177. --]]
  178. local tmp = Root:Find("CardName/Owned").gameObject
  179. if tolua.getpeer(tmp) == nil then
  180. tolua.setpeer(tmp, {})
  181. end
  182. self.cardName.owned = tmp
  183. end
  184. ---@private
  185. function CardSlotItemView:InitGenerate__10(Root, data)
  186. --[[
  187. CardName/Owned/Normal
  188. --]]
  189. local tmp = Root:Find("CardName/Owned/Normal").gameObject
  190. if tolua.getpeer(tmp) == nil then
  191. tolua.setpeer(tmp, {})
  192. end
  193. self.normal = tmp
  194. end
  195. ---@private
  196. function CardSlotItemView:InitGenerate__11(Root, data)
  197. --[[
  198. CardName/Owned/Normal/NameTextNormal
  199. --]]
  200. local tmp = Root:Find("CardName/Owned/Normal/NameTextNormal").gameObject
  201. if tolua.getpeer(tmp) == nil then
  202. tolua.setpeer(tmp, {})
  203. end
  204. self.nameTextNormal = tmp
  205. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  206. tmp.uILocalizeScript = tmp:GetComponent(Enum.TypeInfo.UILocalizeScript)
  207. end
  208. ---@private
  209. function CardSlotItemView:InitGenerate__12(Root, data)
  210. --[[
  211. CardName/Owned/Mini
  212. --]]
  213. local tmp = Root:Find("CardName/Owned/Mini").gameObject
  214. if tolua.getpeer(tmp) == nil then
  215. tolua.setpeer(tmp, {})
  216. end
  217. self.mini = tmp
  218. end
  219. ---@private
  220. function CardSlotItemView:InitGenerate__13(Root, data)
  221. --[[
  222. CardName/Owned/Mini/NameTextMini
  223. --]]
  224. local tmp = Root:Find("CardName/Owned/Mini/NameTextMini").gameObject
  225. if tolua.getpeer(tmp) == nil then
  226. tolua.setpeer(tmp, {})
  227. end
  228. self.nameTextMini = tmp
  229. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  230. tmp.uILocalizeScript = tmp:GetComponent(Enum.TypeInfo.UILocalizeScript)
  231. end
  232. ---@private
  233. function CardSlotItemView:InitGenerate__14(Root, data)
  234. --[[
  235. CardName/Owned/MVP
  236. --]]
  237. local tmp = Root:Find("CardName/Owned/MVP").gameObject
  238. if tolua.getpeer(tmp) == nil then
  239. tolua.setpeer(tmp, {})
  240. end
  241. self.mVP = tmp
  242. end
  243. ---@private
  244. function CardSlotItemView:InitGenerate__15(Root, data)
  245. --[[
  246. CardName/Owned/MVP/NameTextMVP
  247. --]]
  248. local tmp = Root:Find("CardName/Owned/MVP/NameTextMVP").gameObject
  249. if tolua.getpeer(tmp) == nil then
  250. tolua.setpeer(tmp, {})
  251. end
  252. self.nameTextMVP = tmp
  253. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  254. tmp.uILocalizeScript = tmp:GetComponent(Enum.TypeInfo.UILocalizeScript)
  255. end
  256. ---@private
  257. function CardSlotItemView:InitGenerate__16(Root, data)
  258. --[[
  259. CardName/Unowned
  260. --]]
  261. local tmp = Root:Find("CardName/Unowned").gameObject
  262. if tolua.getpeer(tmp) == nil then
  263. tolua.setpeer(tmp, {})
  264. end
  265. self.cardName.unowned = tmp
  266. end
  267. ---@private
  268. function CardSlotItemView:InitGenerate__17(Root, data)
  269. --[[
  270. CardName/Unowned/bg
  271. --]]
  272. local tmp = Root:Find("CardName/Unowned/bg").gameObject
  273. if tolua.getpeer(tmp) == nil then
  274. tolua.setpeer(tmp, {})
  275. end
  276. self.bg = tmp
  277. end
  278. ---@private
  279. function CardSlotItemView:InitGenerate__18(Root, data)
  280. --[[
  281. CardName/Unowned/NoCard
  282. --]]
  283. local tmp = Root:Find("CardName/Unowned/NoCard").gameObject
  284. if tolua.getpeer(tmp) == nil then
  285. tolua.setpeer(tmp, {})
  286. end
  287. self.noCard = tmp
  288. end
  289. ---@private
  290. function CardSlotItemView:InitGenerate__19(Root, data)
  291. --[[
  292. CardName/Locked
  293. --]]
  294. local tmp = Root:Find("CardName/Locked").gameObject
  295. if tolua.getpeer(tmp) == nil then
  296. tolua.setpeer(tmp, {})
  297. end
  298. self.cardName.locked = tmp
  299. end
  300. ---@private
  301. function CardSlotItemView:InitGenerate__20(Root, data)
  302. --[[
  303. CardName/Locked/LvLocked
  304. --]]
  305. local tmp = Root:Find("CardName/Locked/LvLocked").gameObject
  306. if tolua.getpeer(tmp) == nil then
  307. tolua.setpeer(tmp, {})
  308. end
  309. self.lvLocked = tmp
  310. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  311. end
  312. ---@private
  313. function CardSlotItemView:InitGenerate__21(Root, data)
  314. --[[
  315. Grid
  316. --]]
  317. local tmp = Root:Find("Grid").gameObject
  318. if tolua.getpeer(tmp) == nil then
  319. tolua.setpeer(tmp, {})
  320. end
  321. self.grid = tmp
  322. end
  323. ---@private
  324. function CardSlotItemView:GenerateDestroy()
  325. if tolua.getpeer(self.cardName.locked) ~= nil then
  326. tolua.setpeer(self.cardName.locked, nil)
  327. end
  328. if tolua.getpeer(self.cardName.unowned) ~= nil then
  329. tolua.setpeer(self.cardName.unowned, nil)
  330. end
  331. if tolua.getpeer(self.cardName.owned) ~= nil then
  332. tolua.setpeer(self.cardName.owned, nil)
  333. end
  334. if tolua.getpeer(self.cardIcon.locked) ~= nil then
  335. tolua.setpeer(self.cardIcon.locked, nil)
  336. end
  337. if tolua.getpeer(self.cardIcon.unowned.icon) ~= nil then
  338. tolua.setpeer(self.cardIcon.unowned.icon, nil)
  339. end
  340. if tolua.getpeer(self.cardIcon.unowned) ~= nil then
  341. tolua.setpeer(self.cardIcon.unowned, nil)
  342. end
  343. if tolua.getpeer(self.cardIcon.owned) ~= nil then
  344. tolua.setpeer(self.cardIcon.owned, nil)
  345. end
  346. if tolua.getpeer(self.cardIcon) ~= nil then
  347. tolua.setpeer(self.cardIcon, nil)
  348. end
  349. self.cardIcon = nil
  350. if self.iconItem.GenerateDestroy ~= nil then
  351. self.iconItem:GenerateDestroy()
  352. end
  353. if tolua.getpeer(self.iconItem) ~= nil then
  354. tolua.setpeer(self.iconItem, nil)
  355. end
  356. self.iconItem = nil
  357. if tolua.getpeer(self.cardName) ~= nil then
  358. tolua.setpeer(self.cardName, nil)
  359. end
  360. self.cardName = nil
  361. if tolua.getpeer(self.normal) ~= nil then
  362. tolua.setpeer(self.normal, nil)
  363. end
  364. self.normal = nil
  365. if tolua.getpeer(self.nameTextNormal) ~= nil then
  366. tolua.setpeer(self.nameTextNormal, nil)
  367. end
  368. self.nameTextNormal = nil
  369. if tolua.getpeer(self.mini) ~= nil then
  370. tolua.setpeer(self.mini, nil)
  371. end
  372. self.mini = nil
  373. if tolua.getpeer(self.nameTextMini) ~= nil then
  374. tolua.setpeer(self.nameTextMini, nil)
  375. end
  376. self.nameTextMini = nil
  377. if tolua.getpeer(self.mVP) ~= nil then
  378. tolua.setpeer(self.mVP, nil)
  379. end
  380. self.mVP = nil
  381. if tolua.getpeer(self.nameTextMVP) ~= nil then
  382. tolua.setpeer(self.nameTextMVP, nil)
  383. end
  384. self.nameTextMVP = nil
  385. if tolua.getpeer(self.bg) ~= nil then
  386. tolua.setpeer(self.bg, nil)
  387. end
  388. self.bg = nil
  389. if tolua.getpeer(self.noCard) ~= nil then
  390. tolua.setpeer(self.noCard, nil)
  391. end
  392. self.noCard = nil
  393. if tolua.getpeer(self.lvLocked) ~= nil then
  394. tolua.setpeer(self.lvLocked, nil)
  395. end
  396. self.lvLocked = nil
  397. if tolua.getpeer(self.grid) ~= nil then
  398. tolua.setpeer(self.grid, nil)
  399. end
  400. self.grid = nil
  401. self.transform = nil
  402. self.gameObject = nil
  403. self.inited = false
  404. end
  405. return CardSlotItemView