CardIconBigItem_Generate.lua 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. ---@class CardIconBigItem__Generate_count
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text TMPro.TextMeshProUGUI
  4. ---@class CardIconBigItem__Generate_cardLabel
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public image UnityEngine.UI.Image
  7. ---@class CardIconBigItem__Generate_level
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public image UnityEngine.UI.Image
  10. ---@class CardIconBigItem__Generate_name_text
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public text UnityEngine.UI.Text
  13. ---@field public uILocalizeScript UILocalizeScript
  14. ---@class CardIconBigItem__Generate_name
  15. ---@field public gameObject UnityEngine.GameObject
  16. ---@field public text CardIconBigItem__Generate_name_text
  17. ---@class CardIconBigItem__Generate_frame
  18. ---@field public gameObject UnityEngine.GameObject
  19. ---@field public image UnityEngine.UI.Image
  20. ---@class CardIconBigItem__Generate_iconCard
  21. ---@field public gameObject UnityEngine.GameObject
  22. ---@field public image UnityEngine.UI.Image
  23. ---@class CardIconBigItem__Generate_bg
  24. ---@field public gameObject UnityEngine.GameObject
  25. ---@field public image UnityEngine.UI.Image
  26. ---@field public button UnityEngine.UI.Button
  27. ---@class CardIconBigItem__Generate
  28. ---@field private gameObject UnityEngine.GameObject
  29. ---@field private transform UnityEngine.Transform
  30. ---@field private bg CardIconBigItem__Generate_bg
  31. ---@field private iconCard CardIconBigItem__Generate_iconCard
  32. ---@field private frame CardIconBigItem__Generate_frame
  33. ---@field private name CardIconBigItem__Generate_name
  34. ---@field private level CardIconBigItem__Generate_level
  35. ---@field private cardLabel CardIconBigItem__Generate_cardLabel
  36. ---@field private count CardIconBigItem__Generate_count
  37. local CardIconBigItemView = class("CardIconBigItemView")
  38. function CardIconBigItemView:ctor()
  39. end
  40. ---@private
  41. function CardIconBigItemView:SetActive(result)
  42. self.gameObject:SetActive(result)
  43. end
  44. ---@private
  45. function CardIconBigItemView:InitGenerate(Root, data)
  46. self.transform = Root
  47. self.inited = true
  48. local tmp
  49. self:InitGenerate__1(Root,data)
  50. self:InitGenerate__2(Root,data)
  51. self:InitGenerate__3(Root,data)
  52. self:InitGenerate__4(Root,data)
  53. self:InitGenerate__5(Root,data)
  54. self:InitGenerate__6(Root,data)
  55. self:InitGenerate__7(Root,data)
  56. self:InitGenerate__8(Root,data)
  57. self:InitGenerate__9(Root,data)
  58. end
  59. ---@private
  60. function CardIconBigItemView:InitGenerate__1(Root, data)
  61. --[[
  62. Root
  63. --]]
  64. end
  65. ---@private
  66. function CardIconBigItemView:InitGenerate__2(Root, data)
  67. --[[
  68. Bg
  69. --]]
  70. local tmp = Root:Find("Bg").gameObject
  71. if tolua.getpeer(tmp) == nil then
  72. tolua.setpeer(tmp, {})
  73. end
  74. self.bg = tmp
  75. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  76. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  77. end
  78. ---@private
  79. function CardIconBigItemView:InitGenerate__3(Root, data)
  80. --[[
  81. IconCard
  82. --]]
  83. local tmp = Root:Find("IconCard").gameObject
  84. if tolua.getpeer(tmp) == nil then
  85. tolua.setpeer(tmp, {})
  86. end
  87. self.iconCard = tmp
  88. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  89. end
  90. ---@private
  91. function CardIconBigItemView:InitGenerate__4(Root, data)
  92. --[[
  93. Frame
  94. --]]
  95. local tmp = Root:Find("Frame").gameObject
  96. if tolua.getpeer(tmp) == nil then
  97. tolua.setpeer(tmp, {})
  98. end
  99. self.frame = tmp
  100. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  101. end
  102. ---@private
  103. function CardIconBigItemView:InitGenerate__5(Root, data)
  104. --[[
  105. Name
  106. --]]
  107. local tmp = Root:Find("Name").gameObject
  108. if tolua.getpeer(tmp) == nil then
  109. tolua.setpeer(tmp, {})
  110. end
  111. self.name = tmp
  112. end
  113. ---@private
  114. function CardIconBigItemView:InitGenerate__6(Root, data)
  115. --[[
  116. Name/Text
  117. --]]
  118. local tmp = Root:Find("Name/Text").gameObject
  119. if tolua.getpeer(tmp) == nil then
  120. tolua.setpeer(tmp, {})
  121. end
  122. self.name.text = tmp
  123. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  124. tmp.uILocalizeScript = tmp:GetComponent(Enum.TypeInfo.UILocalizeScript)
  125. end
  126. ---@private
  127. function CardIconBigItemView:InitGenerate__7(Root, data)
  128. --[[
  129. Level
  130. --]]
  131. local tmp = Root:Find("Level").gameObject
  132. if tolua.getpeer(tmp) == nil then
  133. tolua.setpeer(tmp, {})
  134. end
  135. self.level = tmp
  136. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  137. end
  138. ---@private
  139. function CardIconBigItemView:InitGenerate__8(Root, data)
  140. --[[
  141. CardLabel
  142. --]]
  143. local tmp = Root:Find("CardLabel").gameObject
  144. if tolua.getpeer(tmp) == nil then
  145. tolua.setpeer(tmp, {})
  146. end
  147. self.cardLabel = tmp
  148. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  149. end
  150. ---@private
  151. function CardIconBigItemView:InitGenerate__9(Root, data)
  152. --[[
  153. Count
  154. --]]
  155. local tmp = Root:Find("Count").gameObject
  156. if tolua.getpeer(tmp) == nil then
  157. tolua.setpeer(tmp, {})
  158. end
  159. self.count = tmp
  160. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  161. end
  162. ---@private
  163. function CardIconBigItemView:GenerateDestroy()
  164. if tolua.getpeer(self.name.text) ~= nil then
  165. tolua.setpeer(self.name.text, nil)
  166. end
  167. if tolua.getpeer(self.bg) ~= nil then
  168. tolua.setpeer(self.bg, nil)
  169. end
  170. self.bg = nil
  171. if tolua.getpeer(self.iconCard) ~= nil then
  172. tolua.setpeer(self.iconCard, nil)
  173. end
  174. self.iconCard = nil
  175. if tolua.getpeer(self.frame) ~= nil then
  176. tolua.setpeer(self.frame, nil)
  177. end
  178. self.frame = nil
  179. if tolua.getpeer(self.name) ~= nil then
  180. tolua.setpeer(self.name, nil)
  181. end
  182. self.name = nil
  183. if tolua.getpeer(self.level) ~= nil then
  184. tolua.setpeer(self.level, nil)
  185. end
  186. self.level = nil
  187. if tolua.getpeer(self.cardLabel) ~= nil then
  188. tolua.setpeer(self.cardLabel, nil)
  189. end
  190. self.cardLabel = nil
  191. if tolua.getpeer(self.count) ~= nil then
  192. tolua.setpeer(self.count, nil)
  193. end
  194. self.count = nil
  195. self.transform = nil
  196. self.gameObject = nil
  197. self.inited = false
  198. end
  199. return CardIconBigItemView