UIFruitUseView_Generate.lua 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. ---@class UIFruitUse__Generate_seniorText
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class UIFruitUse__Generate_primaryText
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public text UnityEngine.UI.Text
  7. ---@class UIFruitUse__Generate_btnClose
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public button UnityEngine.UI.Button
  10. ---@class UIFruitUse__Generate_textTitle
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public text TMPro.TextMeshProUGUI
  13. ---@class UIFruitUse__Generate_AnyBtn
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public button UnityEngine.UI.Button
  16. ---@class UIFruitUse__Generate
  17. ---@field private gameObject UnityEngine.GameObject
  18. ---@field private transform UnityEngine.Transform
  19. ---@field private AnyBtn UIFruitUse__Generate_AnyBtn
  20. ---@field private textTitle UIFruitUse__Generate_textTitle
  21. ---@field private btnClose UIFruitUse__Generate_btnClose
  22. ---@field private primaryImage UnityEngine.GameObject
  23. ---@field private primaryText UIFruitUse__Generate_primaryText
  24. ---@field private seniorImage UnityEngine.GameObject
  25. ---@field private seniorText UIFruitUse__Generate_seniorText
  26. ---@field private hero1 UnityEngine.GameObject
  27. ---@field private hero2 UnityEngine.GameObject
  28. ---@field private hero3 UnityEngine.GameObject
  29. ---@field private hero4 UnityEngine.GameObject
  30. ---@field private hero5 UnityEngine.GameObject
  31. ---@field private hero6 UnityEngine.GameObject
  32. local UIFruitUseView = class("UIFruitUseView", require("UIViewBase"))
  33. function UIFruitUseView:ctor()
  34. end
  35. ---@private
  36. function UIFruitUseView:SetActive(result)
  37. self.gameObject:SetActive(result)
  38. end
  39. ---@private
  40. function UIFruitUseView:InitGenerate(Root, data)
  41. self.transform = Root
  42. self.inited = true
  43. if self.super.Init then
  44. self.super.Init(self)
  45. end
  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 UIFruitUseView:InitGenerate__1(Root, data)
  63. --[[
  64. UIAnimator/Alpha
  65. --]]
  66. local tmp = Root:Find("UIAnimator/Alpha").gameObject
  67. if tolua.getpeer(tmp) == nil then
  68. tolua.setpeer(tmp, {})
  69. end
  70. self.AnyBtn = tmp
  71. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  72. end
  73. ---@private
  74. function UIFruitUseView:InitGenerate__2(Root, data)
  75. --[[
  76. UIAnimator/Window/Bg/TextTitle
  77. --]]
  78. local tmp = Root:Find("UIAnimator/Window/Bg/TextTitle").gameObject
  79. if tolua.getpeer(tmp) == nil then
  80. tolua.setpeer(tmp, {})
  81. end
  82. self.textTitle = tmp
  83. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  84. end
  85. ---@private
  86. function UIFruitUseView:InitGenerate__3(Root, data)
  87. --[[
  88. UIAnimator/Window/Bg/CloseBox/BtnClose
  89. --]]
  90. local tmp = Root:Find("UIAnimator/Window/Bg/CloseBox/BtnClose").gameObject
  91. if tolua.getpeer(tmp) == nil then
  92. tolua.setpeer(tmp, {})
  93. end
  94. self.btnClose = tmp
  95. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  96. end
  97. ---@private
  98. function UIFruitUseView:InitGenerate__4(Root, data)
  99. --[[
  100. UIAnimator/Window/Bg/Content/Fruit/Primary/PrimaryImage
  101. --]]
  102. local tmp = Root:Find("UIAnimator/Window/Bg/Content/Fruit/Primary/PrimaryImage").gameObject
  103. if tolua.getpeer(tmp) == nil then
  104. tolua.setpeer(tmp, {})
  105. end
  106. self.primaryImage = tmp
  107. end
  108. ---@private
  109. function UIFruitUseView:InitGenerate__5(Root, data)
  110. --[[
  111. UIAnimator/Window/Bg/Content/Fruit/Primary/PrimaryText
  112. --]]
  113. local tmp = Root:Find("UIAnimator/Window/Bg/Content/Fruit/Primary/PrimaryText").gameObject
  114. if tolua.getpeer(tmp) == nil then
  115. tolua.setpeer(tmp, {})
  116. end
  117. self.primaryText = tmp
  118. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  119. end
  120. ---@private
  121. function UIFruitUseView:InitGenerate__6(Root, data)
  122. --[[
  123. UIAnimator/Window/Bg/Content/Fruit/Senior/SeniorImage
  124. --]]
  125. local tmp = Root:Find("UIAnimator/Window/Bg/Content/Fruit/Senior/SeniorImage").gameObject
  126. if tolua.getpeer(tmp) == nil then
  127. tolua.setpeer(tmp, {})
  128. end
  129. self.seniorImage = tmp
  130. end
  131. ---@private
  132. function UIFruitUseView:InitGenerate__7(Root, data)
  133. --[[
  134. UIAnimator/Window/Bg/Content/Fruit/Senior/SeniorText
  135. --]]
  136. local tmp = Root:Find("UIAnimator/Window/Bg/Content/Fruit/Senior/SeniorText").gameObject
  137. if tolua.getpeer(tmp) == nil then
  138. tolua.setpeer(tmp, {})
  139. end
  140. self.seniorText = tmp
  141. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  142. end
  143. ---@private
  144. function UIFruitUseView:InitGenerate__8(Root, data)
  145. --[[
  146. UIAnimator/Window/Bg/Content/FruitHeroItem
  147. --]]
  148. local tmp = Root:Find("UIAnimator/Window/Bg/Content/FruitHeroItem").gameObject
  149. if tolua.getpeer(tmp) == nil then
  150. tolua.setpeer(tmp, {})
  151. end
  152. self.hero1 = CommonUtil.BindGridViewItem2LuaStatic("FruitHeroItem", tmp)
  153. self.hero1.prefabName = "FruitHeroItem"
  154. end
  155. ---@private
  156. function UIFruitUseView:InitGenerate__9(Root, data)
  157. --[[
  158. UIAnimator/Window/Bg/Content/FruitHeroItem (1)
  159. --]]
  160. local tmp = Root:Find("UIAnimator/Window/Bg/Content/FruitHeroItem (1)").gameObject
  161. if tolua.getpeer(tmp) == nil then
  162. tolua.setpeer(tmp, {})
  163. end
  164. self.hero2 = CommonUtil.BindGridViewItem2LuaStatic("FruitHeroItem", tmp)
  165. self.hero2.prefabName = "FruitHeroItem"
  166. end
  167. ---@private
  168. function UIFruitUseView:InitGenerate__10(Root, data)
  169. --[[
  170. UIAnimator/Window/Bg/Content/FruitHeroItem (2)
  171. --]]
  172. local tmp = Root:Find("UIAnimator/Window/Bg/Content/FruitHeroItem (2)").gameObject
  173. if tolua.getpeer(tmp) == nil then
  174. tolua.setpeer(tmp, {})
  175. end
  176. self.hero3 = CommonUtil.BindGridViewItem2LuaStatic("FruitHeroItem", tmp)
  177. self.hero3.prefabName = "FruitHeroItem"
  178. end
  179. ---@private
  180. function UIFruitUseView:InitGenerate__11(Root, data)
  181. --[[
  182. UIAnimator/Window/Bg/Content/FruitHeroItem (3)
  183. --]]
  184. local tmp = Root:Find("UIAnimator/Window/Bg/Content/FruitHeroItem (3)").gameObject
  185. if tolua.getpeer(tmp) == nil then
  186. tolua.setpeer(tmp, {})
  187. end
  188. self.hero4 = CommonUtil.BindGridViewItem2LuaStatic("FruitHeroItem", tmp)
  189. self.hero4.prefabName = "FruitHeroItem"
  190. end
  191. ---@private
  192. function UIFruitUseView:InitGenerate__12(Root, data)
  193. --[[
  194. UIAnimator/Window/Bg/Content/FruitHeroItem (4)
  195. --]]
  196. local tmp = Root:Find("UIAnimator/Window/Bg/Content/FruitHeroItem (4)").gameObject
  197. if tolua.getpeer(tmp) == nil then
  198. tolua.setpeer(tmp, {})
  199. end
  200. self.hero5 = CommonUtil.BindGridViewItem2LuaStatic("FruitHeroItem", tmp)
  201. self.hero5.prefabName = "FruitHeroItem"
  202. end
  203. ---@private
  204. function UIFruitUseView:InitGenerate__13(Root, data)
  205. --[[
  206. UIAnimator/Window/Bg/Content/FruitHeroItem (5)
  207. --]]
  208. local tmp = Root:Find("UIAnimator/Window/Bg/Content/FruitHeroItem (5)").gameObject
  209. if tolua.getpeer(tmp) == nil then
  210. tolua.setpeer(tmp, {})
  211. end
  212. self.hero6 = CommonUtil.BindGridViewItem2LuaStatic("FruitHeroItem", tmp)
  213. self.hero6.prefabName = "FruitHeroItem"
  214. end
  215. ---@private
  216. function UIFruitUseView:GenerateDestroy()
  217. if tolua.getpeer(self.AnyBtn) ~= nil then
  218. tolua.setpeer(self.AnyBtn, nil)
  219. end
  220. self.AnyBtn = nil
  221. if tolua.getpeer(self.textTitle) ~= nil then
  222. tolua.setpeer(self.textTitle, nil)
  223. end
  224. self.textTitle = nil
  225. if tolua.getpeer(self.btnClose) ~= nil then
  226. tolua.setpeer(self.btnClose, nil)
  227. end
  228. self.btnClose = nil
  229. if tolua.getpeer(self.primaryImage) ~= nil then
  230. tolua.setpeer(self.primaryImage, nil)
  231. end
  232. self.primaryImage = nil
  233. if tolua.getpeer(self.primaryText) ~= nil then
  234. tolua.setpeer(self.primaryText, nil)
  235. end
  236. self.primaryText = nil
  237. if tolua.getpeer(self.seniorImage) ~= nil then
  238. tolua.setpeer(self.seniorImage, nil)
  239. end
  240. self.seniorImage = nil
  241. if tolua.getpeer(self.seniorText) ~= nil then
  242. tolua.setpeer(self.seniorText, nil)
  243. end
  244. self.seniorText = nil
  245. if self.hero1.GenerateDestroy ~= nil then
  246. self.hero1:GenerateDestroy()
  247. end
  248. if tolua.getpeer(self.hero1) ~= nil then
  249. tolua.setpeer(self.hero1, nil)
  250. end
  251. self.hero1 = nil
  252. if self.hero2.GenerateDestroy ~= nil then
  253. self.hero2:GenerateDestroy()
  254. end
  255. if tolua.getpeer(self.hero2) ~= nil then
  256. tolua.setpeer(self.hero2, nil)
  257. end
  258. self.hero2 = nil
  259. if self.hero3.GenerateDestroy ~= nil then
  260. self.hero3:GenerateDestroy()
  261. end
  262. if tolua.getpeer(self.hero3) ~= nil then
  263. tolua.setpeer(self.hero3, nil)
  264. end
  265. self.hero3 = nil
  266. if self.hero4.GenerateDestroy ~= nil then
  267. self.hero4:GenerateDestroy()
  268. end
  269. if tolua.getpeer(self.hero4) ~= nil then
  270. tolua.setpeer(self.hero4, nil)
  271. end
  272. self.hero4 = nil
  273. if self.hero5.GenerateDestroy ~= nil then
  274. self.hero5:GenerateDestroy()
  275. end
  276. if tolua.getpeer(self.hero5) ~= nil then
  277. tolua.setpeer(self.hero5, nil)
  278. end
  279. self.hero5 = nil
  280. if self.hero6.GenerateDestroy ~= nil then
  281. self.hero6:GenerateDestroy()
  282. end
  283. if tolua.getpeer(self.hero6) ~= nil then
  284. tolua.setpeer(self.hero6, nil)
  285. end
  286. self.hero6 = nil
  287. self.transform = nil
  288. self.gameObject = nil
  289. self.inited = false
  290. end
  291. return UIFruitUseView