VoyageRankItem_Generate.lua 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. ---@class VoyageRankItem__Generate_content
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public horizontalLayoutGroup UnityEngine.UI.HorizontalLayoutGroup
  4. ---@class VoyageRankItem__Generate_rewordNode
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public loopHorizontalScrollRect UnityEngine.UI.LoopHorizontalScrollRect
  7. ---@class VoyageRankItem__Generate_scoreTxt
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public text TMPro.TextMeshProUGUI
  10. ---@class VoyageRankItem__Generate_nameTxt
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public text UnityEngine.UI.Text
  13. ---@class VoyageRankItem__Generate_vipIcon
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public image UnityEngine.UI.Image
  16. ---@class VoyageRankItem__Generate_headItem
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public layoutElement UnityEngine.UI.LayoutElement
  19. ---@class VoyageRankItem__Generate_rankSp
  20. ---@field public gameObject UnityEngine.GameObject
  21. ---@field public uIImageSwitchSprite UIImageSwitchSprite
  22. ---@class VoyageRankItem__Generate_rankTxt
  23. ---@field public gameObject UnityEngine.GameObject
  24. ---@field public text UnityEngine.UI.Text
  25. ---@class VoyageRankItem__Generate
  26. ---@field private gameObject UnityEngine.GameObject
  27. ---@field private transform UnityEngine.Transform
  28. ---@field private rankTxt VoyageRankItem__Generate_rankTxt
  29. ---@field private rankSp VoyageRankItem__Generate_rankSp
  30. ---@field private headItem VoyageRankItem__Generate_headItem
  31. ---@field private vipIcon VoyageRankItem__Generate_vipIcon
  32. ---@field private nameTxt VoyageRankItem__Generate_nameTxt
  33. ---@field private scoreTxt VoyageRankItem__Generate_scoreTxt
  34. ---@field private rewordNode VoyageRankItem__Generate_rewordNode
  35. ---@field private content VoyageRankItem__Generate_content
  36. local VoyageRankItemView = class("VoyageRankItemView")
  37. function VoyageRankItemView:ctor()
  38. end
  39. ---@private
  40. function VoyageRankItemView:SetActive(result)
  41. self.gameObject:SetActive(result)
  42. end
  43. ---@private
  44. function VoyageRankItemView:InitGenerate(Root, data)
  45. self.transform = Root
  46. self.inited = true
  47. local tmp
  48. self:InitGenerate__1(Root,data)
  49. self:InitGenerate__2(Root,data)
  50. self:InitGenerate__3(Root,data)
  51. self:InitGenerate__4(Root,data)
  52. self:InitGenerate__5(Root,data)
  53. self:InitGenerate__6(Root,data)
  54. self:InitGenerate__7(Root,data)
  55. self:InitGenerate__8(Root,data)
  56. self:InitGenerate__9(Root,data)
  57. end
  58. ---@private
  59. function VoyageRankItemView:InitGenerate__1(Root, data)
  60. --[[
  61. Root
  62. --]]
  63. end
  64. ---@private
  65. function VoyageRankItemView:InitGenerate__2(Root, data)
  66. --[[
  67. RankTxt
  68. --]]
  69. local tmp = Root:Find("RankTxt").gameObject
  70. if tolua.getpeer(tmp) == nil then
  71. tolua.setpeer(tmp, {})
  72. end
  73. self.rankTxt = tmp
  74. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  75. end
  76. ---@private
  77. function VoyageRankItemView:InitGenerate__3(Root, data)
  78. --[[
  79. RankSp
  80. --]]
  81. local tmp = Root:Find("RankSp").gameObject
  82. if tolua.getpeer(tmp) == nil then
  83. tolua.setpeer(tmp, {})
  84. end
  85. self.rankSp = tmp
  86. tmp.uIImageSwitchSprite = tmp:GetComponent(Enum.TypeInfo.UIImageSwitchSprite)
  87. end
  88. ---@private
  89. function VoyageRankItemView:InitGenerate__4(Root, data)
  90. --[[
  91. PlayerNode/HeadBox/HeadItem
  92. --]]
  93. local tmp = Root:Find("PlayerNode/HeadBox/HeadItem").gameObject
  94. if tolua.getpeer(tmp) == nil then
  95. tolua.setpeer(tmp, {})
  96. end
  97. self.headItem = CommonUtil.BindGridViewItem2LuaStatic("HeadItem", tmp)
  98. self.headItem.prefabName = "HeadItem"
  99. tmp.layoutElement = tmp:GetComponent(Enum.TypeInfo.LayoutElement)
  100. end
  101. ---@private
  102. function VoyageRankItemView:InitGenerate__5(Root, data)
  103. --[[
  104. PlayerNode/VipIcon
  105. --]]
  106. local tmp = Root:Find("PlayerNode/VipIcon").gameObject
  107. if tolua.getpeer(tmp) == nil then
  108. tolua.setpeer(tmp, {})
  109. end
  110. self.vipIcon = tmp
  111. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  112. end
  113. ---@private
  114. function VoyageRankItemView:InitGenerate__6(Root, data)
  115. --[[
  116. PlayerNode/NameTxt
  117. --]]
  118. local tmp = Root:Find("PlayerNode/NameTxt").gameObject
  119. if tolua.getpeer(tmp) == nil then
  120. tolua.setpeer(tmp, {})
  121. end
  122. self.nameTxt = tmp
  123. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  124. end
  125. ---@private
  126. function VoyageRankItemView:InitGenerate__7(Root, data)
  127. --[[
  128. PlayerNode/ScoreTxt
  129. --]]
  130. local tmp = Root:Find("PlayerNode/ScoreTxt").gameObject
  131. if tolua.getpeer(tmp) == nil then
  132. tolua.setpeer(tmp, {})
  133. end
  134. self.scoreTxt = tmp
  135. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  136. end
  137. ---@private
  138. function VoyageRankItemView:InitGenerate__8(Root, data)
  139. --[[
  140. RewordNode
  141. --]]
  142. local tmp = Root:Find("RewordNode").gameObject
  143. if tolua.getpeer(tmp) == nil then
  144. tolua.setpeer(tmp, {})
  145. end
  146. self.rewordNode = tmp
  147. tmp.loopHorizontalScrollRect = tmp:GetComponent(Enum.TypeInfo.LoopHorizontalScrollRect)
  148. end
  149. ---@private
  150. function VoyageRankItemView:InitGenerate__9(Root, data)
  151. --[[
  152. RewordNode/Viewport/Content
  153. --]]
  154. local tmp = Root:Find("RewordNode/Viewport/Content").gameObject
  155. if tolua.getpeer(tmp) == nil then
  156. tolua.setpeer(tmp, {})
  157. end
  158. self.content = tmp
  159. tmp.horizontalLayoutGroup = tmp:GetComponent(Enum.TypeInfo.HorizontalLayoutGroup)
  160. end
  161. ---@private
  162. function VoyageRankItemView:GenerateDestroy()
  163. if tolua.getpeer(self.rankTxt) ~= nil then
  164. tolua.setpeer(self.rankTxt, nil)
  165. end
  166. self.rankTxt = nil
  167. if tolua.getpeer(self.rankSp) ~= nil then
  168. tolua.setpeer(self.rankSp, nil)
  169. end
  170. self.rankSp = nil
  171. if self.headItem.GenerateDestroy ~= nil then
  172. self.headItem:GenerateDestroy()
  173. end
  174. if tolua.getpeer(self.headItem) ~= nil then
  175. tolua.setpeer(self.headItem, nil)
  176. end
  177. self.headItem = nil
  178. if tolua.getpeer(self.vipIcon) ~= nil then
  179. tolua.setpeer(self.vipIcon, nil)
  180. end
  181. self.vipIcon = nil
  182. if tolua.getpeer(self.nameTxt) ~= nil then
  183. tolua.setpeer(self.nameTxt, nil)
  184. end
  185. self.nameTxt = nil
  186. if tolua.getpeer(self.scoreTxt) ~= nil then
  187. tolua.setpeer(self.scoreTxt, nil)
  188. end
  189. self.scoreTxt = nil
  190. if tolua.getpeer(self.rewordNode) ~= nil then
  191. tolua.setpeer(self.rewordNode, nil)
  192. end
  193. self.rewordNode = nil
  194. if tolua.getpeer(self.content) ~= nil then
  195. tolua.setpeer(self.content, nil)
  196. end
  197. self.content = nil
  198. self.transform = nil
  199. self.gameObject = nil
  200. self.inited = false
  201. end
  202. return VoyageRankItemView