GuildWarRankItem_Generate.lua 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. ---@class GuildWarRankItem__Generate_rankTxt
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class GuildWarRankItem__Generate_currency_numTxt
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public text UnityEngine.UI.Text
  7. ---@class GuildWarRankItem__Generate_currency_icon
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public image UnityEngine.UI.Image
  10. ---@class GuildWarRankItem__Generate_currency
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public icon GuildWarRankItem__Generate_currency_icon
  13. ---@field public numTxt GuildWarRankItem__Generate_currency_numTxt
  14. ---@class GuildWarRankItem__Generate_playerName
  15. ---@field public gameObject UnityEngine.GameObject
  16. ---@field public text UnityEngine.UI.Text
  17. ---@class GuildWarRankItem__Generate_nameTxt
  18. ---@field public gameObject UnityEngine.GameObject
  19. ---@field public text UnityEngine.UI.Text
  20. ---@class GuildWarRankItem__Generate_headItem
  21. ---@field public gameObject UnityEngine.GameObject
  22. ---@field public layoutElement UnityEngine.UI.LayoutElement
  23. ---@class GuildWarRankItem__Generate
  24. ---@field private gameObject UnityEngine.GameObject
  25. ---@field private transform UnityEngine.Transform
  26. ---@field private button UnityEngine.UI.Button
  27. ---@field private headItem GuildWarRankItem__Generate_headItem
  28. ---@field private nameTxt GuildWarRankItem__Generate_nameTxt
  29. ---@field private playerName GuildWarRankItem__Generate_playerName
  30. ---@field private currency GuildWarRankItem__Generate_currency
  31. ---@field private rankTxt GuildWarRankItem__Generate_rankTxt
  32. ---@field private tagMvp UnityEngine.GameObject
  33. local GuildWarRankItemView = class("GuildWarRankItemView")
  34. function GuildWarRankItemView:ctor()
  35. end
  36. ---@private
  37. function GuildWarRankItemView:SetActive(result)
  38. self.gameObject:SetActive(result)
  39. end
  40. ---@private
  41. function GuildWarRankItemView: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. end
  55. ---@private
  56. function GuildWarRankItemView:InitGenerate__1(Root, data)
  57. --[[
  58. Root
  59. --]]
  60. self.button = Root:GetComponent(Enum.TypeInfo.Button)
  61. end
  62. ---@private
  63. function GuildWarRankItemView:InitGenerate__2(Root, data)
  64. --[[
  65. HeadItem
  66. --]]
  67. local tmp = Root:Find("HeadItem").gameObject
  68. if tolua.getpeer(tmp) == nil then
  69. tolua.setpeer(tmp, {})
  70. end
  71. self.headItem = CommonUtil.BindGridViewItem2LuaStatic("HeadItem", tmp)
  72. self.headItem.prefabName = "HeadItem"
  73. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  74. end
  75. ---@private
  76. function GuildWarRankItemView:InitGenerate__3(Root, data)
  77. --[[
  78. NameTxt
  79. --]]
  80. local tmp = Root:Find("NameTxt").gameObject
  81. if tolua.getpeer(tmp) == nil then
  82. tolua.setpeer(tmp, {})
  83. end
  84. self.nameTxt = tmp
  85. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  86. end
  87. ---@private
  88. function GuildWarRankItemView:InitGenerate__4(Root, data)
  89. --[[
  90. PlayerName
  91. --]]
  92. local tmp = Root:Find("PlayerName").gameObject
  93. if tolua.getpeer(tmp) == nil then
  94. tolua.setpeer(tmp, {})
  95. end
  96. self.playerName = tmp
  97. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  98. end
  99. ---@private
  100. function GuildWarRankItemView:InitGenerate__5(Root, data)
  101. --[[
  102. Currency
  103. --]]
  104. local tmp = Root:Find("Currency").gameObject
  105. if tolua.getpeer(tmp) == nil then
  106. tolua.setpeer(tmp, {})
  107. end
  108. self.currency = tmp
  109. end
  110. ---@private
  111. function GuildWarRankItemView:InitGenerate__6(Root, data)
  112. --[[
  113. Currency/Icon
  114. --]]
  115. local tmp = Root:Find("Currency/Icon").gameObject
  116. if tolua.getpeer(tmp) == nil then
  117. tolua.setpeer(tmp, {})
  118. end
  119. self.currency.icon = tmp
  120. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  121. end
  122. ---@private
  123. function GuildWarRankItemView:InitGenerate__7(Root, data)
  124. --[[
  125. Currency/NumTxt
  126. --]]
  127. local tmp = Root:Find("Currency/NumTxt").gameObject
  128. if tolua.getpeer(tmp) == nil then
  129. tolua.setpeer(tmp, {})
  130. end
  131. self.currency.numTxt = tmp
  132. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  133. end
  134. ---@private
  135. function GuildWarRankItemView:InitGenerate__8(Root, data)
  136. --[[
  137. RankTxt
  138. --]]
  139. local tmp = Root:Find("RankTxt").gameObject
  140. if tolua.getpeer(tmp) == nil then
  141. tolua.setpeer(tmp, {})
  142. end
  143. self.rankTxt = tmp
  144. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  145. end
  146. ---@private
  147. function GuildWarRankItemView:InitGenerate__9(Root, data)
  148. --[[
  149. TagMvp
  150. --]]
  151. local tmp = Root:Find("TagMvp").gameObject
  152. if tolua.getpeer(tmp) == nil then
  153. tolua.setpeer(tmp, {})
  154. end
  155. self.tagMvp = tmp
  156. end
  157. ---@private
  158. function GuildWarRankItemView:GenerateDestroy()
  159. if tolua.getpeer(self.currency.numTxt) ~= nil then
  160. tolua.setpeer(self.currency.numTxt, nil)
  161. end
  162. if tolua.getpeer(self.currency.icon) ~= nil then
  163. tolua.setpeer(self.currency.icon, nil)
  164. end
  165. if self.headItem.GenerateDestroy ~= nil then
  166. self.headItem:GenerateDestroy()
  167. end
  168. if tolua.getpeer(self.headItem) ~= nil then
  169. tolua.setpeer(self.headItem, nil)
  170. end
  171. self.headItem = nil
  172. if tolua.getpeer(self.nameTxt) ~= nil then
  173. tolua.setpeer(self.nameTxt, nil)
  174. end
  175. self.nameTxt = nil
  176. if tolua.getpeer(self.playerName) ~= nil then
  177. tolua.setpeer(self.playerName, nil)
  178. end
  179. self.playerName = nil
  180. if tolua.getpeer(self.currency) ~= nil then
  181. tolua.setpeer(self.currency, nil)
  182. end
  183. self.currency = nil
  184. if tolua.getpeer(self.rankTxt) ~= nil then
  185. tolua.setpeer(self.rankTxt, nil)
  186. end
  187. self.rankTxt = nil
  188. if tolua.getpeer(self.tagMvp) ~= nil then
  189. tolua.setpeer(self.tagMvp, nil)
  190. end
  191. self.tagMvp = nil
  192. self.transform = nil
  193. self.gameObject = nil
  194. self.inited = false
  195. end
  196. return GuildWarRankItemView