AllServerItem_Generate.lua 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. ---@class AllServerItem__Generate_playerBox_num
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text TMPro.TextMeshProUGUI
  4. ---@class AllServerItem__Generate_playerBox_jobIcon
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public image UnityEngine.UI.Image
  7. ---@class AllServerItem__Generate_playerBox_frame
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public image UnityEngine.UI.Image
  10. ---@class AllServerItem__Generate_playerBox_headIcon
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public image UnityEngine.UI.Image
  13. ---@class AllServerItem__Generate_playerBox_nameTxt
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public text UnityEngine.UI.Text
  16. ---@class AllServerItem__Generate_playerBox
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public nameTxt AllServerItem__Generate_playerBox_nameTxt
  19. ---@field public headIcon AllServerItem__Generate_playerBox_headIcon
  20. ---@field public frame AllServerItem__Generate_playerBox_frame
  21. ---@field public jobIcon AllServerItem__Generate_playerBox_jobIcon
  22. ---@field public num AllServerItem__Generate_playerBox_num
  23. ---@class AllServerItem__Generate_serverName
  24. ---@field public gameObject UnityEngine.GameObject
  25. ---@field public text UnityEngine.UI.Text
  26. ---@class AllServerItem__Generate
  27. ---@field private gameObject UnityEngine.GameObject
  28. ---@field private transform UnityEngine.Transform
  29. ---@field private button UnityEngine.UI.Button
  30. ---@field private serverName AllServerItem__Generate_serverName
  31. ---@field private playerBox AllServerItem__Generate_playerBox
  32. ---@field private labelCurrent UnityEngine.GameObject
  33. ---@field private labelMaintaining UnityEngine.GameObject
  34. ---@field private labelNew UnityEngine.GameObject
  35. ---@field private redPointTesting UnityEngine.GameObject
  36. local AllServerItemView = class("AllServerItemView")
  37. function AllServerItemView:ctor()
  38. end
  39. ---@private
  40. function AllServerItemView:SetActive(result)
  41. self.gameObject:SetActive(result)
  42. end
  43. ---@private
  44. function AllServerItemView: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. self:InitGenerate__10(Root,data)
  58. self:InitGenerate__11(Root,data)
  59. self:InitGenerate__12(Root,data)
  60. end
  61. ---@private
  62. function AllServerItemView:InitGenerate__1(Root, data)
  63. --[[
  64. Root
  65. --]]
  66. self.button = Root:GetComponent(Enum.TypeInfo.Button)
  67. end
  68. ---@private
  69. function AllServerItemView:InitGenerate__2(Root, data)
  70. --[[
  71. ServerName
  72. --]]
  73. local tmp = Root:Find("ServerName").gameObject
  74. if tolua.getpeer(tmp) == nil then
  75. tolua.setpeer(tmp, {})
  76. end
  77. self.serverName = tmp
  78. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  79. end
  80. ---@private
  81. function AllServerItemView:InitGenerate__3(Root, data)
  82. --[[
  83. PlayerBox
  84. --]]
  85. local tmp = Root:Find("PlayerBox").gameObject
  86. if tolua.getpeer(tmp) == nil then
  87. tolua.setpeer(tmp, {})
  88. end
  89. self.playerBox = tmp
  90. end
  91. ---@private
  92. function AllServerItemView:InitGenerate__4(Root, data)
  93. --[[
  94. PlayerBox/NameTxt
  95. --]]
  96. local tmp = Root:Find("PlayerBox/NameTxt").gameObject
  97. if tolua.getpeer(tmp) == nil then
  98. tolua.setpeer(tmp, {})
  99. end
  100. self.playerBox.nameTxt = tmp
  101. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  102. end
  103. ---@private
  104. function AllServerItemView:InitGenerate__5(Root, data)
  105. --[[
  106. PlayerBox/Head/HeadIcon
  107. --]]
  108. local tmp = Root:Find("PlayerBox/Head/HeadIcon").gameObject
  109. if tolua.getpeer(tmp) == nil then
  110. tolua.setpeer(tmp, {})
  111. end
  112. self.playerBox.headIcon = tmp
  113. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  114. end
  115. ---@private
  116. function AllServerItemView:InitGenerate__6(Root, data)
  117. --[[
  118. PlayerBox/Head/Frame
  119. --]]
  120. local tmp = Root:Find("PlayerBox/Head/Frame").gameObject
  121. if tolua.getpeer(tmp) == nil then
  122. tolua.setpeer(tmp, {})
  123. end
  124. self.playerBox.frame = tmp
  125. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  126. end
  127. ---@private
  128. function AllServerItemView:InitGenerate__7(Root, data)
  129. --[[
  130. PlayerBox/Head/JobIcon
  131. --]]
  132. local tmp = Root:Find("PlayerBox/Head/JobIcon").gameObject
  133. if tolua.getpeer(tmp) == nil then
  134. tolua.setpeer(tmp, {})
  135. end
  136. self.playerBox.jobIcon = tmp
  137. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  138. end
  139. ---@private
  140. function AllServerItemView:InitGenerate__8(Root, data)
  141. --[[
  142. PlayerBox/Head/Num
  143. --]]
  144. local tmp = Root:Find("PlayerBox/Head/Num").gameObject
  145. if tolua.getpeer(tmp) == nil then
  146. tolua.setpeer(tmp, {})
  147. end
  148. self.playerBox.num = tmp
  149. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  150. end
  151. ---@private
  152. function AllServerItemView:InitGenerate__9(Root, data)
  153. --[[
  154. LabelCurrent
  155. --]]
  156. local tmp = Root:Find("LabelCurrent").gameObject
  157. if tolua.getpeer(tmp) == nil then
  158. tolua.setpeer(tmp, {})
  159. end
  160. self.labelCurrent = tmp
  161. end
  162. ---@private
  163. function AllServerItemView:InitGenerate__10(Root, data)
  164. --[[
  165. LabelMaintaining
  166. --]]
  167. local tmp = Root:Find("LabelMaintaining").gameObject
  168. if tolua.getpeer(tmp) == nil then
  169. tolua.setpeer(tmp, {})
  170. end
  171. self.labelMaintaining = tmp
  172. end
  173. ---@private
  174. function AllServerItemView:InitGenerate__11(Root, data)
  175. --[[
  176. LabelNew
  177. --]]
  178. local tmp = Root:Find("LabelNew").gameObject
  179. if tolua.getpeer(tmp) == nil then
  180. tolua.setpeer(tmp, {})
  181. end
  182. self.labelNew = tmp
  183. end
  184. ---@private
  185. function AllServerItemView:InitGenerate__12(Root, data)
  186. --[[
  187. LabelNew/UITesting
  188. --]]
  189. local tmp = Root:Find("LabelNew/UITesting").gameObject
  190. if tolua.getpeer(tmp) == nil then
  191. tolua.setpeer(tmp, {})
  192. end
  193. self.redPointTesting = tmp
  194. self.redPointTesting:SetActive(false)
  195. end
  196. ---@private
  197. function AllServerItemView:GenerateDestroy()
  198. if tolua.getpeer(self.playerBox.num) ~= nil then
  199. tolua.setpeer(self.playerBox.num, nil)
  200. end
  201. if tolua.getpeer(self.playerBox.jobIcon) ~= nil then
  202. tolua.setpeer(self.playerBox.jobIcon, nil)
  203. end
  204. if tolua.getpeer(self.playerBox.frame) ~= nil then
  205. tolua.setpeer(self.playerBox.frame, nil)
  206. end
  207. if tolua.getpeer(self.playerBox.headIcon) ~= nil then
  208. tolua.setpeer(self.playerBox.headIcon, nil)
  209. end
  210. if tolua.getpeer(self.playerBox.nameTxt) ~= nil then
  211. tolua.setpeer(self.playerBox.nameTxt, nil)
  212. end
  213. if tolua.getpeer(self.playerBox) ~= nil then
  214. tolua.setpeer(self.playerBox, nil)
  215. end
  216. if tolua.getpeer(self.serverName) ~= nil then
  217. tolua.setpeer(self.serverName, nil)
  218. end
  219. self.serverName = nil
  220. if tolua.getpeer(self.labelCurrent) ~= nil then
  221. tolua.setpeer(self.labelCurrent, nil)
  222. end
  223. self.labelCurrent = nil
  224. if tolua.getpeer(self.labelMaintaining) ~= nil then
  225. tolua.setpeer(self.labelMaintaining, nil)
  226. end
  227. self.labelMaintaining = nil
  228. if tolua.getpeer(self.labelNew) ~= nil then
  229. tolua.setpeer(self.labelNew, nil)
  230. end
  231. self.labelNew = nil
  232. if tolua.getpeer(self.redPointTesting) ~= nil then
  233. tolua.setpeer(self.redPointTesting, nil)
  234. end
  235. self.redPointTesting = nil
  236. self.transform = nil
  237. self.gameObject = nil
  238. self.inited = false
  239. end
  240. return AllServerItemView