CardCollect_Generate.lua 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. ---@class CardCollect__Generate_cardLabel
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public image UnityEngine.UI.Image
  4. ---@class CardCollect__Generate_frame
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public image UnityEngine.UI.Image
  7. ---@class CardCollect__Generate_icon
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public image UnityEngine.UI.Image
  10. ---@class CardCollect__Generate_bg
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public image UnityEngine.UI.Image
  13. ---@field public button UnityEngine.UI.Button
  14. ---@field public repeatButton UnityEngine.UI.RepeatButton
  15. ---@class CardCollect__Generate
  16. ---@field private gameObject UnityEngine.GameObject
  17. ---@field private transform UnityEngine.Transform
  18. ---@field private cardIconItem UnityEngine.GameObject
  19. ---@field private bg CardCollect__Generate_bg
  20. ---@field private icon CardCollect__Generate_icon
  21. ---@field private frame CardCollect__Generate_frame
  22. ---@field private cardLabel CardCollect__Generate_cardLabel
  23. ---@field private mask UnityEngine.GameObject
  24. ---@field private uIRedPointRP UnityEngine.GameObject
  25. local CardCollectView = class("CardCollectView")
  26. function CardCollectView:ctor()
  27. end
  28. ---@private
  29. function CardCollectView:SetActive(result)
  30. self.gameObject:SetActive(result)
  31. end
  32. ---@private
  33. function CardCollectView:InitGenerate(Root, data)
  34. self.transform = Root
  35. self.inited = true
  36. local tmp
  37. self:InitGenerate__1(Root,data)
  38. self:InitGenerate__2(Root,data)
  39. self:InitGenerate__3(Root,data)
  40. self:InitGenerate__4(Root,data)
  41. self:InitGenerate__5(Root,data)
  42. self:InitGenerate__6(Root,data)
  43. self:InitGenerate__7(Root,data)
  44. self:InitGenerate__8(Root,data)
  45. end
  46. ---@private
  47. function CardCollectView:InitGenerate__1(Root, data)
  48. --[[
  49. Root
  50. --]]
  51. end
  52. ---@private
  53. function CardCollectView:InitGenerate__2(Root, data)
  54. --[[
  55. CardIconItem
  56. --]]
  57. local tmp = Root:Find("CardIconItem").gameObject
  58. if tolua.getpeer(tmp) == nil then
  59. tolua.setpeer(tmp, {})
  60. end
  61. self.cardIconItem = tmp
  62. end
  63. ---@private
  64. function CardCollectView:InitGenerate__3(Root, data)
  65. --[[
  66. CardIconItem/Bg
  67. --]]
  68. local tmp = Root:Find("CardIconItem/Bg").gameObject
  69. if tolua.getpeer(tmp) == nil then
  70. tolua.setpeer(tmp, {})
  71. end
  72. self.bg = tmp
  73. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  74. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  75. tmp.repeatButton = tmp:GetComponent(Enum.TypeInfo.RepeatButton)
  76. end
  77. ---@private
  78. function CardCollectView:InitGenerate__4(Root, data)
  79. --[[
  80. CardIconItem/Icon
  81. --]]
  82. local tmp = Root:Find("CardIconItem/Icon").gameObject
  83. if tolua.getpeer(tmp) == nil then
  84. tolua.setpeer(tmp, {})
  85. end
  86. self.icon = tmp
  87. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  88. end
  89. ---@private
  90. function CardCollectView:InitGenerate__5(Root, data)
  91. --[[
  92. CardIconItem/Frame
  93. --]]
  94. local tmp = Root:Find("CardIconItem/Frame").gameObject
  95. if tolua.getpeer(tmp) == nil then
  96. tolua.setpeer(tmp, {})
  97. end
  98. self.frame = tmp
  99. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  100. end
  101. ---@private
  102. function CardCollectView:InitGenerate__6(Root, data)
  103. --[[
  104. CardIconItem/CardLabel
  105. --]]
  106. local tmp = Root:Find("CardIconItem/CardLabel").gameObject
  107. if tolua.getpeer(tmp) == nil then
  108. tolua.setpeer(tmp, {})
  109. end
  110. self.cardLabel = tmp
  111. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  112. end
  113. ---@private
  114. function CardCollectView:InitGenerate__7(Root, data)
  115. --[[
  116. CardIconItem/Mask
  117. --]]
  118. local tmp = Root:Find("CardIconItem/Mask").gameObject
  119. if tolua.getpeer(tmp) == nil then
  120. tolua.setpeer(tmp, {})
  121. end
  122. self.mask = tmp
  123. end
  124. ---@private
  125. function CardCollectView:InitGenerate__8(Root, data)
  126. --[[
  127. UIRedPointRP
  128. --]]
  129. local tmp = Root:Find("UIRedPointRP").gameObject
  130. if tolua.getpeer(tmp) == nil then
  131. tolua.setpeer(tmp, {})
  132. end
  133. self.uIRedPointRP = tmp
  134. end
  135. ---@private
  136. function CardCollectView:GenerateDestroy()
  137. if tolua.getpeer(self.cardIconItem) ~= nil then
  138. tolua.setpeer(self.cardIconItem, nil)
  139. end
  140. self.cardIconItem = nil
  141. if tolua.getpeer(self.bg) ~= nil then
  142. tolua.setpeer(self.bg, nil)
  143. end
  144. self.bg = nil
  145. if tolua.getpeer(self.icon) ~= nil then
  146. tolua.setpeer(self.icon, nil)
  147. end
  148. self.icon = nil
  149. if tolua.getpeer(self.frame) ~= nil then
  150. tolua.setpeer(self.frame, nil)
  151. end
  152. self.frame = nil
  153. if tolua.getpeer(self.cardLabel) ~= nil then
  154. tolua.setpeer(self.cardLabel, nil)
  155. end
  156. self.cardLabel = nil
  157. if tolua.getpeer(self.mask) ~= nil then
  158. tolua.setpeer(self.mask, nil)
  159. end
  160. self.mask = nil
  161. if tolua.getpeer(self.uIRedPointRP) ~= nil then
  162. tolua.setpeer(self.uIRedPointRP, nil)
  163. end
  164. self.uIRedPointRP = nil
  165. self.transform = nil
  166. self.gameObject = nil
  167. self.inited = false
  168. end
  169. return CardCollectView