SkillSmallItem_Generate.lua 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. ---@class SkillSmallItem__Generate_artifactStatus_icon
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public image UnityEngine.UI.Image
  4. ---@class SkillSmallItem__Generate_artifactStatus
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public button UnityEngine.UI.Button
  7. ---@field public activated UnityEngine.GameObject
  8. ---@field public icon SkillSmallItem__Generate_artifactStatus_icon
  9. ---@class SkillSmallItem__Generate_skillName
  10. ---@field public gameObject UnityEngine.GameObject
  11. ---@field public text UnityEngine.UI.Text
  12. ---@class SkillSmallItem__Generate_skillItem
  13. ---@field public gameObject UnityEngine.GameObject
  14. ---@field public rectTransform UnityEngine.RectTransform
  15. ---@class SkillSmallItem__Generate
  16. ---@field private gameObject UnityEngine.GameObject
  17. ---@field private transform UnityEngine.Transform
  18. ---@field private button UnityEngine.UI.Button
  19. ---@field private selectSign UnityEngine.GameObject
  20. ---@field private skillItem SkillSmallItem__Generate_skillItem
  21. ---@field private skillName SkillSmallItem__Generate_skillName
  22. ---@field private skillTagItem1 UnityEngine.GameObject
  23. ---@field private skillTagItem2 UnityEngine.GameObject
  24. ---@field private skillTagItem3 UnityEngine.GameObject
  25. ---@field private skillTagItem4 UnityEngine.GameObject
  26. ---@field private lock UnityEngine.GameObject
  27. ---@field private redPoint UnityEngine.GameObject
  28. ---@field private redPointNewItem UnityEngine.GameObject
  29. ---@field private newRedPoint UnityEngine.GameObject
  30. ---@field private equipSign UnityEngine.GameObject
  31. ---@field private artifactStatus SkillSmallItem__Generate_artifactStatus
  32. local SkillSmallItemView = class("SkillSmallItemView")
  33. function SkillSmallItemView:ctor()
  34. end
  35. ---@private
  36. function SkillSmallItemView:SetActive(result)
  37. self.gameObject:SetActive(result)
  38. end
  39. ---@private
  40. function SkillSmallItemView:InitGenerate(Root, data)
  41. self.transform = Root
  42. self.inited = true
  43. local tmp
  44. self:InitGenerate__1(Root,data)
  45. self:InitGenerate__2(Root,data)
  46. self:InitGenerate__3(Root,data)
  47. self:InitGenerate__4(Root,data)
  48. self:InitGenerate__5(Root,data)
  49. self:InitGenerate__6(Root,data)
  50. self:InitGenerate__7(Root,data)
  51. self:InitGenerate__8(Root,data)
  52. self:InitGenerate__9(Root,data)
  53. self:InitGenerate__10(Root,data)
  54. self:InitGenerate__11(Root,data)
  55. self:InitGenerate__12(Root,data)
  56. self:InitGenerate__13(Root,data)
  57. self:InitGenerate__14(Root,data)
  58. self:InitGenerate__15(Root,data)
  59. self:InitGenerate__16(Root,data)
  60. end
  61. ---@private
  62. function SkillSmallItemView:InitGenerate__1(Root, data)
  63. --[[
  64. Root
  65. --]]
  66. self.button = Root:GetComponent(Enum.TypeInfo.Button)
  67. end
  68. ---@private
  69. function SkillSmallItemView:InitGenerate__2(Root, data)
  70. --[[
  71. SelectSign
  72. --]]
  73. local tmp = Root:Find("SelectSign").gameObject
  74. if tolua.getpeer(tmp) == nil then
  75. tolua.setpeer(tmp, {})
  76. end
  77. self.selectSign = tmp
  78. end
  79. ---@private
  80. function SkillSmallItemView:InitGenerate__3(Root, data)
  81. --[[
  82. Icon/SkillItem
  83. --]]
  84. local tmp = Root:Find("Icon/SkillItem").gameObject
  85. if tolua.getpeer(tmp) == nil then
  86. tolua.setpeer(tmp, {})
  87. end
  88. self.skillItem = CommonUtil.BindGridViewItem2LuaStatic("SkillItem", tmp)
  89. self.skillItem.prefabName = "SkillItem"
  90. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  91. end
  92. ---@private
  93. function SkillSmallItemView:InitGenerate__4(Root, data)
  94. --[[
  95. TextsBox/SkillName
  96. --]]
  97. local tmp = Root:Find("TextsBox/SkillName").gameObject
  98. if tolua.getpeer(tmp) == nil then
  99. tolua.setpeer(tmp, {})
  100. end
  101. self.skillName = tmp
  102. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  103. end
  104. ---@private
  105. function SkillSmallItemView:InitGenerate__5(Root, data)
  106. --[[
  107. TextsBox/TagBox/Viewport/Content/SkillTagItem1
  108. --]]
  109. local tmp = Root:Find("TextsBox/TagBox/Viewport/Content/SkillTagItem1").gameObject
  110. if tolua.getpeer(tmp) == nil then
  111. tolua.setpeer(tmp, {})
  112. end
  113. self.skillTagItem1 = CommonUtil.BindGridViewItem2LuaStatic("SkillTagItem", tmp)
  114. self.skillTagItem1.prefabName = "SkillTagItem"
  115. end
  116. ---@private
  117. function SkillSmallItemView:InitGenerate__6(Root, data)
  118. --[[
  119. TextsBox/TagBox/Viewport/Content/SkillTagItem2
  120. --]]
  121. local tmp = Root:Find("TextsBox/TagBox/Viewport/Content/SkillTagItem2").gameObject
  122. if tolua.getpeer(tmp) == nil then
  123. tolua.setpeer(tmp, {})
  124. end
  125. self.skillTagItem2 = CommonUtil.BindGridViewItem2LuaStatic("SkillTagItem", tmp)
  126. self.skillTagItem2.prefabName = "SkillTagItem"
  127. end
  128. ---@private
  129. function SkillSmallItemView:InitGenerate__7(Root, data)
  130. --[[
  131. TextsBox/TagBox/Viewport/Content/SkillTagItem3
  132. --]]
  133. local tmp = Root:Find("TextsBox/TagBox/Viewport/Content/SkillTagItem3").gameObject
  134. if tolua.getpeer(tmp) == nil then
  135. tolua.setpeer(tmp, {})
  136. end
  137. self.skillTagItem3 = CommonUtil.BindGridViewItem2LuaStatic("SkillTagItem", tmp)
  138. self.skillTagItem3.prefabName = "SkillTagItem"
  139. end
  140. ---@private
  141. function SkillSmallItemView:InitGenerate__8(Root, data)
  142. --[[
  143. TextsBox/TagBox/Viewport/Content/SkillTagItem4
  144. --]]
  145. local tmp = Root:Find("TextsBox/TagBox/Viewport/Content/SkillTagItem4").gameObject
  146. if tolua.getpeer(tmp) == nil then
  147. tolua.setpeer(tmp, {})
  148. end
  149. self.skillTagItem4 = CommonUtil.BindGridViewItem2LuaStatic("SkillTagItem", tmp)
  150. self.skillTagItem4.prefabName = "SkillTagItem"
  151. end
  152. ---@private
  153. function SkillSmallItemView:InitGenerate__9(Root, data)
  154. --[[
  155. Lock
  156. --]]
  157. local tmp = Root:Find("Lock").gameObject
  158. if tolua.getpeer(tmp) == nil then
  159. tolua.setpeer(tmp, {})
  160. end
  161. self.lock = tmp
  162. end
  163. ---@private
  164. function SkillSmallItemView:InitGenerate__10(Root, data)
  165. --[[
  166. RedPoint
  167. --]]
  168. local tmp = Root:Find("RedPoint").gameObject
  169. if tolua.getpeer(tmp) == nil then
  170. tolua.setpeer(tmp, {})
  171. end
  172. self.redPoint = tmp
  173. end
  174. ---@private
  175. function SkillSmallItemView:InitGenerate__11(Root, data)
  176. --[[
  177. RedPoint/UINewRP
  178. --]]
  179. local tmp = Root:Find("RedPoint/UINewRP").gameObject
  180. if tolua.getpeer(tmp) == nil then
  181. tolua.setpeer(tmp, {})
  182. end
  183. self.redPointNewItem = tmp
  184. end
  185. ---@private
  186. function SkillSmallItemView:InitGenerate__12(Root, data)
  187. --[[
  188. NewRedPoint
  189. --]]
  190. local tmp = Root:Find("NewRedPoint").gameObject
  191. if tolua.getpeer(tmp) == nil then
  192. tolua.setpeer(tmp, {})
  193. end
  194. self.newRedPoint = tmp
  195. end
  196. ---@private
  197. function SkillSmallItemView:InitGenerate__13(Root, data)
  198. --[[
  199. EquipSign
  200. --]]
  201. local tmp = Root:Find("EquipSign").gameObject
  202. if tolua.getpeer(tmp) == nil then
  203. tolua.setpeer(tmp, {})
  204. end
  205. self.equipSign = tmp
  206. end
  207. ---@private
  208. function SkillSmallItemView:InitGenerate__14(Root, data)
  209. --[[
  210. ArtifactStatus
  211. --]]
  212. local tmp = Root:Find("ArtifactStatus").gameObject
  213. if tolua.getpeer(tmp) == nil then
  214. tolua.setpeer(tmp, {})
  215. end
  216. self.artifactStatus = tmp
  217. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  218. end
  219. ---@private
  220. function SkillSmallItemView:InitGenerate__15(Root, data)
  221. --[[
  222. ArtifactStatus/activated
  223. --]]
  224. local tmp = Root:Find("ArtifactStatus/activated").gameObject
  225. if tolua.getpeer(tmp) == nil then
  226. tolua.setpeer(tmp, {})
  227. end
  228. self.artifactStatus.activated = tmp
  229. end
  230. ---@private
  231. function SkillSmallItemView:InitGenerate__16(Root, data)
  232. --[[
  233. ArtifactStatus/icon
  234. --]]
  235. local tmp = Root:Find("ArtifactStatus/icon").gameObject
  236. if tolua.getpeer(tmp) == nil then
  237. tolua.setpeer(tmp, {})
  238. end
  239. self.artifactStatus.icon = tmp
  240. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  241. end
  242. ---@private
  243. function SkillSmallItemView:GenerateDestroy()
  244. if tolua.getpeer(self.artifactStatus.icon) ~= nil then
  245. tolua.setpeer(self.artifactStatus.icon, nil)
  246. end
  247. if tolua.getpeer(self.artifactStatus.activated) ~= nil then
  248. tolua.setpeer(self.artifactStatus.activated, nil)
  249. end
  250. if tolua.getpeer(self.selectSign) ~= nil then
  251. tolua.setpeer(self.selectSign, nil)
  252. end
  253. self.selectSign = nil
  254. if self.skillItem.GenerateDestroy ~= nil then
  255. self.skillItem:GenerateDestroy()
  256. end
  257. if tolua.getpeer(self.skillItem) ~= nil then
  258. tolua.setpeer(self.skillItem, nil)
  259. end
  260. self.skillItem = nil
  261. if tolua.getpeer(self.skillName) ~= nil then
  262. tolua.setpeer(self.skillName, nil)
  263. end
  264. self.skillName = nil
  265. if self.skillTagItem1.GenerateDestroy ~= nil then
  266. self.skillTagItem1:GenerateDestroy()
  267. end
  268. if tolua.getpeer(self.skillTagItem1) ~= nil then
  269. tolua.setpeer(self.skillTagItem1, nil)
  270. end
  271. self.skillTagItem1 = nil
  272. if self.skillTagItem2.GenerateDestroy ~= nil then
  273. self.skillTagItem2:GenerateDestroy()
  274. end
  275. if tolua.getpeer(self.skillTagItem2) ~= nil then
  276. tolua.setpeer(self.skillTagItem2, nil)
  277. end
  278. self.skillTagItem2 = nil
  279. if self.skillTagItem3.GenerateDestroy ~= nil then
  280. self.skillTagItem3:GenerateDestroy()
  281. end
  282. if tolua.getpeer(self.skillTagItem3) ~= nil then
  283. tolua.setpeer(self.skillTagItem3, nil)
  284. end
  285. self.skillTagItem3 = nil
  286. if self.skillTagItem4.GenerateDestroy ~= nil then
  287. self.skillTagItem4:GenerateDestroy()
  288. end
  289. if tolua.getpeer(self.skillTagItem4) ~= nil then
  290. tolua.setpeer(self.skillTagItem4, nil)
  291. end
  292. self.skillTagItem4 = nil
  293. if tolua.getpeer(self.lock) ~= nil then
  294. tolua.setpeer(self.lock, nil)
  295. end
  296. self.lock = nil
  297. if tolua.getpeer(self.redPoint) ~= nil then
  298. tolua.setpeer(self.redPoint, nil)
  299. end
  300. self.redPoint = nil
  301. if tolua.getpeer(self.redPointNewItem) ~= nil then
  302. tolua.setpeer(self.redPointNewItem, nil)
  303. end
  304. self.redPointNewItem = nil
  305. if tolua.getpeer(self.newRedPoint) ~= nil then
  306. tolua.setpeer(self.newRedPoint, nil)
  307. end
  308. self.newRedPoint = nil
  309. if tolua.getpeer(self.equipSign) ~= nil then
  310. tolua.setpeer(self.equipSign, nil)
  311. end
  312. self.equipSign = nil
  313. if tolua.getpeer(self.artifactStatus) ~= nil then
  314. tolua.setpeer(self.artifactStatus, nil)
  315. end
  316. self.artifactStatus = nil
  317. self.transform = nil
  318. self.gameObject = nil
  319. self.inited = false
  320. end
  321. return SkillSmallItemView