UIPetAttributeView_Generate.lua 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. ---@class UIPetAttribute__Generate_addSView_content
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public gridLayoutGroup UnityEngine.UI.GridLayoutGroup
  4. ---@class UIPetAttribute__Generate_addSView
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public rectTransform UnityEngine.RectTransform
  7. ---@field public loopVerticalScrollRect UnityEngine.UI.LoopVerticalScrollRect
  8. ---@field public content UIPetAttribute__Generate_addSView_content
  9. ---@class UIPetAttribute__Generate_baseSView_content
  10. ---@field public gameObject UnityEngine.GameObject
  11. ---@field public gridLayoutGroup UnityEngine.UI.GridLayoutGroup
  12. ---@class UIPetAttribute__Generate_baseSView
  13. ---@field public gameObject UnityEngine.GameObject
  14. ---@field public rectTransform UnityEngine.RectTransform
  15. ---@field public loopVerticalScrollRect UnityEngine.UI.LoopVerticalScrollRect
  16. ---@field public content UIPetAttribute__Generate_baseSView_content
  17. ---@class UIPetAttribute__Generate_bg
  18. ---@field public gameObject UnityEngine.GameObject
  19. ---@field public verticalLayoutGroup UnityEngine.UI.VerticalLayoutGroup
  20. ---@class UIPetAttribute__Generate_AnyBtn
  21. ---@field public gameObject UnityEngine.GameObject
  22. ---@field public button UnityEngine.UI.Button
  23. ---@class UIPetAttribute__Generate_uIAnimator
  24. ---@field public gameObject UnityEngine.GameObject
  25. ---@field public animator UnityEngine.Animator
  26. ---@class UIPetAttribute__Generate
  27. ---@field private gameObject UnityEngine.GameObject
  28. ---@field private transform UnityEngine.Transform
  29. ---@field private uIAnimator UIPetAttribute__Generate_uIAnimator
  30. ---@field private AnyBtn UIPetAttribute__Generate_AnyBtn
  31. ---@field private window UnityEngine.GameObject
  32. ---@field private bg UIPetAttribute__Generate_bg
  33. ---@field private baseAttrs UnityEngine.GameObject
  34. ---@field private baseSView UIPetAttribute__Generate_baseSView
  35. ---@field private addAttrs UnityEngine.GameObject
  36. ---@field private addSView UIPetAttribute__Generate_addSView
  37. ---@field private none UnityEngine.GameObject
  38. ---@field private natureAttrItem UnityEngine.GameObject
  39. local UIPetAttributeView = class("UIPetAttributeView", require("UIViewBase"))
  40. function UIPetAttributeView:ctor()
  41. end
  42. ---@private
  43. function UIPetAttributeView:SetActive(result)
  44. self.gameObject:SetActive(result)
  45. end
  46. ---@private
  47. function UIPetAttributeView:InitGenerate(Root, data)
  48. self.transform = Root
  49. self.inited = true
  50. if self.super.Init then
  51. self.super.Init(self)
  52. end
  53. local tmp
  54. self:InitGenerate__1(Root,data)
  55. self:InitGenerate__2(Root,data)
  56. self:InitGenerate__3(Root,data)
  57. self:InitGenerate__4(Root,data)
  58. self:InitGenerate__5(Root,data)
  59. self:InitGenerate__6(Root,data)
  60. self:InitGenerate__7(Root,data)
  61. self:InitGenerate__8(Root,data)
  62. self:InitGenerate__9(Root,data)
  63. self:InitGenerate__10(Root,data)
  64. self:InitGenerate__11(Root,data)
  65. self:InitGenerate__12(Root,data)
  66. self:InitGenerate__13(Root,data)
  67. end
  68. ---@private
  69. function UIPetAttributeView:InitGenerate__1(Root, data)
  70. --[[
  71. Root
  72. --]]
  73. end
  74. ---@private
  75. function UIPetAttributeView:InitGenerate__2(Root, data)
  76. --[[
  77. UIAnimator
  78. --]]
  79. local tmp = Root:Find("UIAnimator").gameObject
  80. if tolua.getpeer(tmp) == nil then
  81. tolua.setpeer(tmp, {})
  82. end
  83. self.uIAnimator = tmp
  84. tmp.animator = tmp:GetComponent(Enum.TypeInfo.Animator)
  85. tmp.animator.logWarnings = false
  86. end
  87. ---@private
  88. function UIPetAttributeView:InitGenerate__3(Root, data)
  89. --[[
  90. UIAnimator/Alpha
  91. --]]
  92. local tmp = Root:Find("UIAnimator/Alpha").gameObject
  93. if tolua.getpeer(tmp) == nil then
  94. tolua.setpeer(tmp, {})
  95. end
  96. self.AnyBtn = tmp
  97. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  98. end
  99. ---@private
  100. function UIPetAttributeView:InitGenerate__4(Root, data)
  101. --[[
  102. UIAnimator/Window
  103. --]]
  104. local tmp = Root:Find("UIAnimator/Window").gameObject
  105. if tolua.getpeer(tmp) == nil then
  106. tolua.setpeer(tmp, {})
  107. end
  108. self.window = tmp
  109. end
  110. ---@private
  111. function UIPetAttributeView:InitGenerate__5(Root, data)
  112. --[[
  113. UIAnimator/Window/Bg
  114. --]]
  115. local tmp = Root:Find("UIAnimator/Window/Bg").gameObject
  116. if tolua.getpeer(tmp) == nil then
  117. tolua.setpeer(tmp, {})
  118. end
  119. self.bg = tmp
  120. tmp.verticalLayoutGroup = tmp:GetComponent(Enum.TypeInfo.VerticalLayoutGroup)
  121. end
  122. ---@private
  123. function UIPetAttributeView:InitGenerate__6(Root, data)
  124. --[[
  125. UIAnimator/Window/Bg/Nature/Scroll View/Viewport/Content/BaseAttrs
  126. --]]
  127. local tmp = Root:Find("UIAnimator/Window/Bg/Nature/Scroll View/Viewport/Content/BaseAttrs").gameObject
  128. if tolua.getpeer(tmp) == nil then
  129. tolua.setpeer(tmp, {})
  130. end
  131. self.baseAttrs = tmp
  132. end
  133. ---@private
  134. function UIPetAttributeView:InitGenerate__7(Root, data)
  135. --[[
  136. UIAnimator/Window/Bg/Nature/Scroll View/Viewport/Content/BaseSView
  137. --]]
  138. local tmp = Root:Find("UIAnimator/Window/Bg/Nature/Scroll View/Viewport/Content/BaseSView").gameObject
  139. if tolua.getpeer(tmp) == nil then
  140. tolua.setpeer(tmp, {})
  141. end
  142. self.baseSView = tmp
  143. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  144. tmp.loopVerticalScrollRect = tmp:GetComponent(Enum.TypeInfo.LoopVerticalScrollRect)
  145. end
  146. ---@private
  147. function UIPetAttributeView:InitGenerate__8(Root, data)
  148. --[[
  149. UIAnimator/Window/Bg/Nature/Scroll View/Viewport/Content/BaseSView/Viewport/Content
  150. --]]
  151. local tmp = Root:Find("UIAnimator/Window/Bg/Nature/Scroll View/Viewport/Content/BaseSView/Viewport/Content").gameObject
  152. if tolua.getpeer(tmp) == nil then
  153. tolua.setpeer(tmp, {})
  154. end
  155. self.baseSView.content = tmp
  156. tmp.gridLayoutGroup = tmp:GetComponent(Enum.TypeInfo.GridLayoutGroup)
  157. end
  158. ---@private
  159. function UIPetAttributeView:InitGenerate__9(Root, data)
  160. --[[
  161. UIAnimator/Window/Bg/Nature/Scroll View/Viewport/Content/AddAttrs
  162. --]]
  163. local tmp = Root:Find("UIAnimator/Window/Bg/Nature/Scroll View/Viewport/Content/AddAttrs").gameObject
  164. if tolua.getpeer(tmp) == nil then
  165. tolua.setpeer(tmp, {})
  166. end
  167. self.addAttrs = tmp
  168. end
  169. ---@private
  170. function UIPetAttributeView:InitGenerate__10(Root, data)
  171. --[[
  172. UIAnimator/Window/Bg/Nature/Scroll View/Viewport/Content/AddSView
  173. --]]
  174. local tmp = Root:Find("UIAnimator/Window/Bg/Nature/Scroll View/Viewport/Content/AddSView").gameObject
  175. if tolua.getpeer(tmp) == nil then
  176. tolua.setpeer(tmp, {})
  177. end
  178. self.addSView = tmp
  179. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  180. tmp.loopVerticalScrollRect = tmp:GetComponent(Enum.TypeInfo.LoopVerticalScrollRect)
  181. end
  182. ---@private
  183. function UIPetAttributeView:InitGenerate__11(Root, data)
  184. --[[
  185. UIAnimator/Window/Bg/Nature/Scroll View/Viewport/Content/AddSView/Viewport/Content
  186. --]]
  187. local tmp = Root:Find("UIAnimator/Window/Bg/Nature/Scroll View/Viewport/Content/AddSView/Viewport/Content").gameObject
  188. if tolua.getpeer(tmp) == nil then
  189. tolua.setpeer(tmp, {})
  190. end
  191. self.addSView.content = tmp
  192. tmp.gridLayoutGroup = tmp:GetComponent(Enum.TypeInfo.GridLayoutGroup)
  193. end
  194. ---@private
  195. function UIPetAttributeView:InitGenerate__12(Root, data)
  196. --[[
  197. UIAnimator/Window/Bg/Nature/Scroll View/Viewport/Content/None
  198. --]]
  199. local tmp = Root:Find("UIAnimator/Window/Bg/Nature/Scroll View/Viewport/Content/None").gameObject
  200. if tolua.getpeer(tmp) == nil then
  201. tolua.setpeer(tmp, {})
  202. end
  203. self.none = tmp
  204. end
  205. ---@private
  206. function UIPetAttributeView:InitGenerate__13(Root, data)
  207. --[[
  208. UIAnimator/Window/Bg/Nature/Scroll View/Viewport/NatureAttrItem
  209. --]]
  210. local tmp = Root:Find("UIAnimator/Window/Bg/Nature/Scroll View/Viewport/NatureAttrItem").gameObject
  211. if tolua.getpeer(tmp) == nil then
  212. tolua.setpeer(tmp, {})
  213. end
  214. self.natureAttrItem = CommonUtil.BindGridViewItem2LuaStatic("NatureAttrItem", tmp)
  215. self.natureAttrItem.prefabName = "NatureAttrItem"
  216. end
  217. ---@private
  218. function UIPetAttributeView:GenerateDestroy()
  219. if tolua.getpeer(self.addSView.content) ~= nil then
  220. tolua.setpeer(self.addSView.content, nil)
  221. end
  222. if tolua.getpeer(self.baseSView.content) ~= nil then
  223. tolua.setpeer(self.baseSView.content, nil)
  224. end
  225. if tolua.getpeer(self.uIAnimator) ~= nil then
  226. tolua.setpeer(self.uIAnimator, nil)
  227. end
  228. self.uIAnimator = nil
  229. if tolua.getpeer(self.AnyBtn) ~= nil then
  230. tolua.setpeer(self.AnyBtn, nil)
  231. end
  232. self.AnyBtn = nil
  233. if tolua.getpeer(self.window) ~= nil then
  234. tolua.setpeer(self.window, nil)
  235. end
  236. self.window = nil
  237. if tolua.getpeer(self.bg) ~= nil then
  238. tolua.setpeer(self.bg, nil)
  239. end
  240. self.bg = nil
  241. if tolua.getpeer(self.baseAttrs) ~= nil then
  242. tolua.setpeer(self.baseAttrs, nil)
  243. end
  244. self.baseAttrs = nil
  245. if tolua.getpeer(self.baseSView) ~= nil then
  246. tolua.setpeer(self.baseSView, nil)
  247. end
  248. self.baseSView = nil
  249. if tolua.getpeer(self.addAttrs) ~= nil then
  250. tolua.setpeer(self.addAttrs, nil)
  251. end
  252. self.addAttrs = nil
  253. if tolua.getpeer(self.addSView) ~= nil then
  254. tolua.setpeer(self.addSView, nil)
  255. end
  256. self.addSView = nil
  257. if tolua.getpeer(self.none) ~= nil then
  258. tolua.setpeer(self.none, nil)
  259. end
  260. self.none = nil
  261. if self.natureAttrItem.GenerateDestroy ~= nil then
  262. self.natureAttrItem:GenerateDestroy()
  263. end
  264. if tolua.getpeer(self.natureAttrItem) ~= nil then
  265. tolua.setpeer(self.natureAttrItem, nil)
  266. end
  267. self.natureAttrItem = nil
  268. self.transform = nil
  269. self.gameObject = nil
  270. self.inited = false
  271. end
  272. return UIPetAttributeView