FashionWearItem_Generate.lua 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. ---@class FashionWearItem__Generate_fashionName
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class FashionWearItem__Generate_num
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public text TMPro.TextMeshProUGUI
  7. ---@class FashionWearItem__Generate_frame
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public image UnityEngine.UI.Image
  10. ---@class FashionWearItem__Generate_icon
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public image UnityEngine.UI.Image
  13. ---@class FashionWearItem__Generate_bg
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public image UnityEngine.UI.Image
  16. ---@field public button UnityEngine.UI.Button
  17. ---@class FashionWearItem__Generate_group
  18. ---@field public gameObject UnityEngine.GameObject
  19. ---@field public canvasGroup UnityEngine.CanvasGroup
  20. ---@class FashionWearItem__Generate
  21. ---@field private gameObject UnityEngine.GameObject
  22. ---@field private transform UnityEngine.Transform
  23. ---@field private group FashionWearItem__Generate_group
  24. ---@field private bg FashionWearItem__Generate_bg
  25. ---@field private icon FashionWearItem__Generate_icon
  26. ---@field private frame FashionWearItem__Generate_frame
  27. ---@field private selected UnityEngine.GameObject
  28. ---@field private disable UnityEngine.GameObject
  29. ---@field private image UnityEngine.GameObject
  30. ---@field private selected2 UnityEngine.GameObject
  31. ---@field private redPoint UnityEngine.GameObject
  32. ---@field private num FashionWearItem__Generate_num
  33. ---@field private nameBox UnityEngine.GameObject
  34. ---@field private fashionName FashionWearItem__Generate_fashionName
  35. local FashionWearItemView = class("FashionWearItemView")
  36. function FashionWearItemView:ctor()
  37. end
  38. ---@private
  39. function FashionWearItemView:SetActive(result)
  40. self.gameObject:SetActive(result)
  41. end
  42. ---@private
  43. function FashionWearItemView:InitGenerate(Root, data)
  44. self.transform = Root
  45. self.inited = true
  46. local tmp
  47. self:InitGenerate__1(Root,data)
  48. self:InitGenerate__2(Root,data)
  49. self:InitGenerate__3(Root,data)
  50. self:InitGenerate__4(Root,data)
  51. self:InitGenerate__5(Root,data)
  52. self:InitGenerate__6(Root,data)
  53. self:InitGenerate__7(Root,data)
  54. self:InitGenerate__8(Root,data)
  55. self:InitGenerate__9(Root,data)
  56. self:InitGenerate__10(Root,data)
  57. self:InitGenerate__11(Root,data)
  58. self:InitGenerate__12(Root,data)
  59. self:InitGenerate__13(Root,data)
  60. end
  61. ---@private
  62. function FashionWearItemView:InitGenerate__1(Root, data)
  63. --[[
  64. Root
  65. --]]
  66. end
  67. ---@private
  68. function FashionWearItemView:InitGenerate__2(Root, data)
  69. --[[
  70. Group
  71. --]]
  72. local tmp = Root:Find("Group").gameObject
  73. if tolua.getpeer(tmp) == nil then
  74. tolua.setpeer(tmp, {})
  75. end
  76. self.group = tmp
  77. tmp.canvasGroup = tmp:GetComponent(Enum.TypeInfo.CanvasGroup)
  78. end
  79. ---@private
  80. function FashionWearItemView:InitGenerate__3(Root, data)
  81. --[[
  82. Group/Bg
  83. --]]
  84. local tmp = Root:Find("Group/Bg").gameObject
  85. if tolua.getpeer(tmp) == nil then
  86. tolua.setpeer(tmp, {})
  87. end
  88. self.bg = tmp
  89. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  90. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  91. end
  92. ---@private
  93. function FashionWearItemView:InitGenerate__4(Root, data)
  94. --[[
  95. Group/Icon
  96. --]]
  97. local tmp = Root:Find("Group/Icon").gameObject
  98. if tolua.getpeer(tmp) == nil then
  99. tolua.setpeer(tmp, {})
  100. end
  101. self.icon = tmp
  102. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  103. end
  104. ---@private
  105. function FashionWearItemView:InitGenerate__5(Root, data)
  106. --[[
  107. Group/Frame
  108. --]]
  109. local tmp = Root:Find("Group/Frame").gameObject
  110. if tolua.getpeer(tmp) == nil then
  111. tolua.setpeer(tmp, {})
  112. end
  113. self.frame = tmp
  114. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  115. end
  116. ---@private
  117. function FashionWearItemView:InitGenerate__6(Root, data)
  118. --[[
  119. Selected
  120. --]]
  121. local tmp = Root:Find("Selected").gameObject
  122. if tolua.getpeer(tmp) == nil then
  123. tolua.setpeer(tmp, {})
  124. end
  125. self.selected = tmp
  126. end
  127. ---@private
  128. function FashionWearItemView:InitGenerate__7(Root, data)
  129. --[[
  130. Disable
  131. --]]
  132. local tmp = Root:Find("Disable").gameObject
  133. if tolua.getpeer(tmp) == nil then
  134. tolua.setpeer(tmp, {})
  135. end
  136. self.disable = tmp
  137. end
  138. ---@private
  139. function FashionWearItemView:InitGenerate__8(Root, data)
  140. --[[
  141. Disable/image
  142. --]]
  143. local tmp = Root:Find("Disable/image").gameObject
  144. if tolua.getpeer(tmp) == nil then
  145. tolua.setpeer(tmp, {})
  146. end
  147. self.image = tmp
  148. end
  149. ---@private
  150. function FashionWearItemView:InitGenerate__9(Root, data)
  151. --[[
  152. Selected2
  153. --]]
  154. local tmp = Root:Find("Selected2").gameObject
  155. if tolua.getpeer(tmp) == nil then
  156. tolua.setpeer(tmp, {})
  157. end
  158. self.selected2 = tmp
  159. end
  160. ---@private
  161. function FashionWearItemView:InitGenerate__10(Root, data)
  162. --[[
  163. UIRedPointRP
  164. --]]
  165. local tmp = Root:Find("UIRedPointRP").gameObject
  166. if tolua.getpeer(tmp) == nil then
  167. tolua.setpeer(tmp, {})
  168. end
  169. self.redPoint = tmp
  170. end
  171. ---@private
  172. function FashionWearItemView:InitGenerate__11(Root, data)
  173. --[[
  174. Num
  175. --]]
  176. local tmp = Root:Find("Num").gameObject
  177. if tolua.getpeer(tmp) == nil then
  178. tolua.setpeer(tmp, {})
  179. end
  180. self.num = tmp
  181. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  182. end
  183. ---@private
  184. function FashionWearItemView:InitGenerate__12(Root, data)
  185. --[[
  186. NameBox
  187. --]]
  188. local tmp = Root:Find("NameBox").gameObject
  189. if tolua.getpeer(tmp) == nil then
  190. tolua.setpeer(tmp, {})
  191. end
  192. self.nameBox = tmp
  193. end
  194. ---@private
  195. function FashionWearItemView:InitGenerate__13(Root, data)
  196. --[[
  197. NameBox/fashionName
  198. --]]
  199. local tmp = Root:Find("NameBox/fashionName").gameObject
  200. if tolua.getpeer(tmp) == nil then
  201. tolua.setpeer(tmp, {})
  202. end
  203. self.fashionName = tmp
  204. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  205. end
  206. ---@private
  207. function FashionWearItemView:GenerateDestroy()
  208. if tolua.getpeer(self.fashionName) ~= nil then
  209. tolua.setpeer(self.fashionName, nil)
  210. end
  211. if tolua.getpeer(self.nameBox) ~= nil then
  212. tolua.setpeer(self.nameBox, nil)
  213. end
  214. if tolua.getpeer(self.group) ~= nil then
  215. tolua.setpeer(self.group, nil)
  216. end
  217. self.group = nil
  218. if tolua.getpeer(self.bg) ~= nil then
  219. tolua.setpeer(self.bg, nil)
  220. end
  221. self.bg = nil
  222. if tolua.getpeer(self.icon) ~= nil then
  223. tolua.setpeer(self.icon, nil)
  224. end
  225. self.icon = nil
  226. if tolua.getpeer(self.frame) ~= nil then
  227. tolua.setpeer(self.frame, nil)
  228. end
  229. self.frame = nil
  230. if tolua.getpeer(self.selected) ~= nil then
  231. tolua.setpeer(self.selected, nil)
  232. end
  233. self.selected = nil
  234. if tolua.getpeer(self.disable) ~= nil then
  235. tolua.setpeer(self.disable, nil)
  236. end
  237. self.disable = nil
  238. if tolua.getpeer(self.image) ~= nil then
  239. tolua.setpeer(self.image, nil)
  240. end
  241. self.image = nil
  242. if tolua.getpeer(self.selected2) ~= nil then
  243. tolua.setpeer(self.selected2, nil)
  244. end
  245. self.selected2 = nil
  246. if tolua.getpeer(self.redPoint) ~= nil then
  247. tolua.setpeer(self.redPoint, nil)
  248. end
  249. self.redPoint = nil
  250. if tolua.getpeer(self.num) ~= nil then
  251. tolua.setpeer(self.num, nil)
  252. end
  253. self.num = nil
  254. self.transform = nil
  255. self.gameObject = nil
  256. self.inited = false
  257. end
  258. return FashionWearItemView