DemonChampRankItem_Generate.lua 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. ---@class DemonChampRankItem__Generate_rankTxt
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class DemonChampRankItem__Generate_number
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public text UnityEngine.UI.Text
  7. ---@class DemonChampRankItem__Generate_allianceName
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public text UnityEngine.UI.Text
  10. ---@class DemonChampRankItem__Generate_vipIcon
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public image UnityEngine.UI.Image
  13. ---@class DemonChampRankItem__Generate_nameTxt
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public text UnityEngine.UI.Text
  16. ---@class DemonChampRankItem__Generate_headItem
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public layoutElement UnityEngine.UI.LayoutElement
  19. ---@class DemonChampRankItem__Generate
  20. ---@field private gameObject UnityEngine.GameObject
  21. ---@field private transform UnityEngine.Transform
  22. ---@field private button UnityEngine.UI.Button
  23. ---@field private headItem DemonChampRankItem__Generate_headItem
  24. ---@field private nameTxt DemonChampRankItem__Generate_nameTxt
  25. ---@field private vipIcon DemonChampRankItem__Generate_vipIcon
  26. ---@field private allianceIcon UnityEngine.GameObject
  27. ---@field private allianceName DemonChampRankItem__Generate_allianceName
  28. ---@field private number DemonChampRankItem__Generate_number
  29. ---@field private rankTxt DemonChampRankItem__Generate_rankTxt
  30. ---@field private rank1 UnityEngine.GameObject
  31. ---@field private rank2 UnityEngine.GameObject
  32. ---@field private rank3 UnityEngine.GameObject
  33. local DemonChampRankItemView = class("DemonChampRankItemView")
  34. function DemonChampRankItemView:ctor()
  35. end
  36. ---@private
  37. function DemonChampRankItemView:SetActive(result)
  38. self.gameObject:SetActive(result)
  39. end
  40. ---@private
  41. function DemonChampRankItemView:InitGenerate(Root, data)
  42. self.transform = Root
  43. self.inited = true
  44. local tmp
  45. self:InitGenerate__1(Root,data)
  46. self:InitGenerate__2(Root,data)
  47. self:InitGenerate__3(Root,data)
  48. self:InitGenerate__4(Root,data)
  49. self:InitGenerate__5(Root,data)
  50. self:InitGenerate__6(Root,data)
  51. self:InitGenerate__7(Root,data)
  52. self:InitGenerate__8(Root,data)
  53. self:InitGenerate__9(Root,data)
  54. self:InitGenerate__10(Root,data)
  55. self:InitGenerate__11(Root,data)
  56. end
  57. ---@private
  58. function DemonChampRankItemView:InitGenerate__1(Root, data)
  59. --[[
  60. Root
  61. --]]
  62. self.button = Root:GetComponent(Enum.TypeInfo.Button)
  63. end
  64. ---@private
  65. function DemonChampRankItemView:InitGenerate__2(Root, data)
  66. --[[
  67. HeadItem
  68. --]]
  69. local tmp = Root:Find("HeadItem").gameObject
  70. if tolua.getpeer(tmp) == nil then
  71. tolua.setpeer(tmp, {})
  72. end
  73. self.headItem = CommonUtil.BindGridViewItem2LuaStatic("HeadItem", tmp)
  74. self.headItem.prefabName = "HeadItem"
  75. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  76. end
  77. ---@private
  78. function DemonChampRankItemView:InitGenerate__3(Root, data)
  79. --[[
  80. NameTxt
  81. --]]
  82. local tmp = Root:Find("NameTxt").gameObject
  83. if tolua.getpeer(tmp) == nil then
  84. tolua.setpeer(tmp, {})
  85. end
  86. self.nameTxt = tmp
  87. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  88. end
  89. ---@private
  90. function DemonChampRankItemView:InitGenerate__4(Root, data)
  91. --[[
  92. VipIcon
  93. --]]
  94. local tmp = Root:Find("VipIcon").gameObject
  95. if tolua.getpeer(tmp) == nil then
  96. tolua.setpeer(tmp, {})
  97. end
  98. self.vipIcon = tmp
  99. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  100. end
  101. ---@private
  102. function DemonChampRankItemView:InitGenerate__5(Root, data)
  103. --[[
  104. Guild/Icon
  105. --]]
  106. local tmp = Root:Find("Guild/Icon").gameObject
  107. if tolua.getpeer(tmp) == nil then
  108. tolua.setpeer(tmp, {})
  109. end
  110. self.allianceIcon = tmp
  111. end
  112. ---@private
  113. function DemonChampRankItemView:InitGenerate__6(Root, data)
  114. --[[
  115. Guild/AllianceName
  116. --]]
  117. local tmp = Root:Find("Guild/AllianceName").gameObject
  118. if tolua.getpeer(tmp) == nil then
  119. tolua.setpeer(tmp, {})
  120. end
  121. self.allianceName = tmp
  122. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  123. end
  124. ---@private
  125. function DemonChampRankItemView:InitGenerate__7(Root, data)
  126. --[[
  127. Dmg/Number
  128. --]]
  129. local tmp = Root:Find("Dmg/Number").gameObject
  130. if tolua.getpeer(tmp) == nil then
  131. tolua.setpeer(tmp, {})
  132. end
  133. self.number = tmp
  134. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  135. end
  136. ---@private
  137. function DemonChampRankItemView:InitGenerate__8(Root, data)
  138. --[[
  139. RankTxt
  140. --]]
  141. local tmp = Root:Find("RankTxt").gameObject
  142. if tolua.getpeer(tmp) == nil then
  143. tolua.setpeer(tmp, {})
  144. end
  145. self.rankTxt = tmp
  146. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  147. end
  148. ---@private
  149. function DemonChampRankItemView:InitGenerate__9(Root, data)
  150. --[[
  151. Rank1
  152. --]]
  153. local tmp = Root:Find("Rank1").gameObject
  154. if tolua.getpeer(tmp) == nil then
  155. tolua.setpeer(tmp, {})
  156. end
  157. self.rank1 = tmp
  158. end
  159. ---@private
  160. function DemonChampRankItemView:InitGenerate__10(Root, data)
  161. --[[
  162. Rank2
  163. --]]
  164. local tmp = Root:Find("Rank2").gameObject
  165. if tolua.getpeer(tmp) == nil then
  166. tolua.setpeer(tmp, {})
  167. end
  168. self.rank2 = tmp
  169. end
  170. ---@private
  171. function DemonChampRankItemView:InitGenerate__11(Root, data)
  172. --[[
  173. Rank3
  174. --]]
  175. local tmp = Root:Find("Rank3").gameObject
  176. if tolua.getpeer(tmp) == nil then
  177. tolua.setpeer(tmp, {})
  178. end
  179. self.rank3 = tmp
  180. end
  181. ---@private
  182. function DemonChampRankItemView:GenerateDestroy()
  183. if self.headItem.GenerateDestroy ~= nil then
  184. self.headItem:GenerateDestroy()
  185. end
  186. if tolua.getpeer(self.headItem) ~= nil then
  187. tolua.setpeer(self.headItem, nil)
  188. end
  189. self.headItem = nil
  190. if tolua.getpeer(self.nameTxt) ~= nil then
  191. tolua.setpeer(self.nameTxt, nil)
  192. end
  193. self.nameTxt = nil
  194. if tolua.getpeer(self.vipIcon) ~= nil then
  195. tolua.setpeer(self.vipIcon, nil)
  196. end
  197. self.vipIcon = nil
  198. if tolua.getpeer(self.allianceIcon) ~= nil then
  199. tolua.setpeer(self.allianceIcon, nil)
  200. end
  201. self.allianceIcon = nil
  202. if tolua.getpeer(self.allianceName) ~= nil then
  203. tolua.setpeer(self.allianceName, nil)
  204. end
  205. self.allianceName = nil
  206. if tolua.getpeer(self.number) ~= nil then
  207. tolua.setpeer(self.number, nil)
  208. end
  209. self.number = nil
  210. if tolua.getpeer(self.rankTxt) ~= nil then
  211. tolua.setpeer(self.rankTxt, nil)
  212. end
  213. self.rankTxt = nil
  214. if tolua.getpeer(self.rank1) ~= nil then
  215. tolua.setpeer(self.rank1, nil)
  216. end
  217. self.rank1 = nil
  218. if tolua.getpeer(self.rank2) ~= nil then
  219. tolua.setpeer(self.rank2, nil)
  220. end
  221. self.rank2 = nil
  222. if tolua.getpeer(self.rank3) ~= nil then
  223. tolua.setpeer(self.rank3, nil)
  224. end
  225. self.rank3 = nil
  226. self.transform = nil
  227. self.gameObject = nil
  228. self.inited = false
  229. end
  230. return DemonChampRankItemView