ExpeditionRankItem_Generate.lua 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. ---@class ExpeditionRankItem__Generate_rankTxt
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class ExpeditionRankItem__Generate_guildCPTxt
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public text UnityEngine.UI.Text
  7. ---@class ExpeditionRankItem__Generate_lvTxt
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public text UnityEngine.UI.Text
  10. ---@class ExpeditionRankItem__Generate_vipIcon
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public image UnityEngine.UI.Image
  13. ---@class ExpeditionRankItem__Generate_nameTxt
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public text UnityEngine.UI.Text
  16. ---@class ExpeditionRankItem__Generate_headItem
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public layoutElement UnityEngine.UI.LayoutElement
  19. ---@class ExpeditionRankItem__Generate
  20. ---@field private gameObject UnityEngine.GameObject
  21. ---@field private transform UnityEngine.Transform
  22. ---@field private button UnityEngine.UI.Button
  23. ---@field private headItem ExpeditionRankItem__Generate_headItem
  24. ---@field private nameTxt ExpeditionRankItem__Generate_nameTxt
  25. ---@field private vipIcon ExpeditionRankItem__Generate_vipIcon
  26. ---@field private lvTxt ExpeditionRankItem__Generate_lvTxt
  27. ---@field private guildCPTxt ExpeditionRankItem__Generate_guildCPTxt
  28. ---@field private rankTxt ExpeditionRankItem__Generate_rankTxt
  29. ---@field private rank1 UnityEngine.GameObject
  30. ---@field private rank2 UnityEngine.GameObject
  31. ---@field private rank3 UnityEngine.GameObject
  32. local ExpeditionRankItemView = class("ExpeditionRankItemView")
  33. function ExpeditionRankItemView:ctor()
  34. end
  35. ---@private
  36. function ExpeditionRankItemView:SetActive(result)
  37. self.gameObject:SetActive(result)
  38. end
  39. ---@private
  40. function ExpeditionRankItemView: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. end
  55. ---@private
  56. function ExpeditionRankItemView:InitGenerate__1(Root, data)
  57. --[[
  58. Root
  59. --]]
  60. self.button = Root:GetComponent(Enum.TypeInfo.Button)
  61. end
  62. ---@private
  63. function ExpeditionRankItemView: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 ExpeditionRankItemView: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 ExpeditionRankItemView:InitGenerate__4(Root, data)
  89. --[[
  90. VipIcon
  91. --]]
  92. local tmp = Root:Find("VipIcon").gameObject
  93. if tolua.getpeer(tmp) == nil then
  94. tolua.setpeer(tmp, {})
  95. end
  96. self.vipIcon = tmp
  97. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  98. end
  99. ---@private
  100. function ExpeditionRankItemView:InitGenerate__5(Root, data)
  101. --[[
  102. LvTxt
  103. --]]
  104. local tmp = Root:Find("LvTxt").gameObject
  105. if tolua.getpeer(tmp) == nil then
  106. tolua.setpeer(tmp, {})
  107. end
  108. self.lvTxt = tmp
  109. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  110. end
  111. ---@private
  112. function ExpeditionRankItemView:InitGenerate__6(Root, data)
  113. --[[
  114. GuildCP/GuildCPTxt
  115. --]]
  116. local tmp = Root:Find("GuildCP/GuildCPTxt").gameObject
  117. if tolua.getpeer(tmp) == nil then
  118. tolua.setpeer(tmp, {})
  119. end
  120. self.guildCPTxt = tmp
  121. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  122. end
  123. ---@private
  124. function ExpeditionRankItemView:InitGenerate__7(Root, data)
  125. --[[
  126. RankTxt
  127. --]]
  128. local tmp = Root:Find("RankTxt").gameObject
  129. if tolua.getpeer(tmp) == nil then
  130. tolua.setpeer(tmp, {})
  131. end
  132. self.rankTxt = tmp
  133. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  134. end
  135. ---@private
  136. function ExpeditionRankItemView:InitGenerate__8(Root, data)
  137. --[[
  138. Rank1
  139. --]]
  140. local tmp = Root:Find("Rank1").gameObject
  141. if tolua.getpeer(tmp) == nil then
  142. tolua.setpeer(tmp, {})
  143. end
  144. self.rank1 = tmp
  145. end
  146. ---@private
  147. function ExpeditionRankItemView:InitGenerate__9(Root, data)
  148. --[[
  149. Rank2
  150. --]]
  151. local tmp = Root:Find("Rank2").gameObject
  152. if tolua.getpeer(tmp) == nil then
  153. tolua.setpeer(tmp, {})
  154. end
  155. self.rank2 = tmp
  156. end
  157. ---@private
  158. function ExpeditionRankItemView:InitGenerate__10(Root, data)
  159. --[[
  160. Rank3
  161. --]]
  162. local tmp = Root:Find("Rank3").gameObject
  163. if tolua.getpeer(tmp) == nil then
  164. tolua.setpeer(tmp, {})
  165. end
  166. self.rank3 = tmp
  167. end
  168. ---@private
  169. function ExpeditionRankItemView:GenerateDestroy()
  170. if self.headItem.GenerateDestroy ~= nil then
  171. self.headItem:GenerateDestroy()
  172. end
  173. if tolua.getpeer(self.headItem) ~= nil then
  174. tolua.setpeer(self.headItem, nil)
  175. end
  176. self.headItem = nil
  177. if tolua.getpeer(self.nameTxt) ~= nil then
  178. tolua.setpeer(self.nameTxt, nil)
  179. end
  180. self.nameTxt = nil
  181. if tolua.getpeer(self.vipIcon) ~= nil then
  182. tolua.setpeer(self.vipIcon, nil)
  183. end
  184. self.vipIcon = nil
  185. if tolua.getpeer(self.lvTxt) ~= nil then
  186. tolua.setpeer(self.lvTxt, nil)
  187. end
  188. self.lvTxt = nil
  189. if tolua.getpeer(self.guildCPTxt) ~= nil then
  190. tolua.setpeer(self.guildCPTxt, nil)
  191. end
  192. self.guildCPTxt = nil
  193. if tolua.getpeer(self.rankTxt) ~= nil then
  194. tolua.setpeer(self.rankTxt, nil)
  195. end
  196. self.rankTxt = nil
  197. if tolua.getpeer(self.rank1) ~= nil then
  198. tolua.setpeer(self.rank1, nil)
  199. end
  200. self.rank1 = nil
  201. if tolua.getpeer(self.rank2) ~= nil then
  202. tolua.setpeer(self.rank2, nil)
  203. end
  204. self.rank2 = nil
  205. if tolua.getpeer(self.rank3) ~= nil then
  206. tolua.setpeer(self.rank3, nil)
  207. end
  208. self.rank3 = nil
  209. self.transform = nil
  210. self.gameObject = nil
  211. self.inited = false
  212. end
  213. return ExpeditionRankItemView