UIExpeditionBattleView_Generate.lua 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. ---@class UIExpeditionBattle__Generate_curLevel
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class UIExpeditionBattle__Generate_leftTime
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public text UnityEngine.UI.Text
  7. ---@class UIExpeditionBattle__Generate_mapName
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public text UnityEngine.UI.Text
  10. ---@class UIExpeditionBattle__Generate
  11. ---@field private gameObject UnityEngine.GameObject
  12. ---@field private transform UnityEngine.Transform
  13. ---@field private mapName UIExpeditionBattle__Generate_mapName
  14. ---@field private leftTime UIExpeditionBattle__Generate_leftTime
  15. ---@field private infinite UnityEngine.GameObject
  16. ---@field private curLevel UIExpeditionBattle__Generate_curLevel
  17. local UIExpeditionBattleView = class("UIExpeditionBattleView", require("UIViewBase"))
  18. function UIExpeditionBattleView:ctor()
  19. end
  20. ---@private
  21. function UIExpeditionBattleView:SetActive(result)
  22. self.gameObject:SetActive(result)
  23. end
  24. ---@private
  25. function UIExpeditionBattleView:InitGenerate(Root, data)
  26. self.transform = Root
  27. self.inited = true
  28. if self.super.Init then
  29. self.super.Init(self)
  30. end
  31. local tmp
  32. self:InitGenerate__1(Root,data)
  33. self:InitGenerate__2(Root,data)
  34. self:InitGenerate__3(Root,data)
  35. self:InitGenerate__4(Root,data)
  36. end
  37. ---@private
  38. function UIExpeditionBattleView:InitGenerate__1(Root, data)
  39. --[[
  40. TopView/UITitle/BoardTitle
  41. --]]
  42. local tmp = Root:Find("TopView/UITitle/BoardTitle").gameObject
  43. if tolua.getpeer(tmp) == nil then
  44. tolua.setpeer(tmp, {})
  45. end
  46. self.mapName = tmp
  47. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  48. end
  49. ---@private
  50. function UIExpeditionBattleView:InitGenerate__2(Root, data)
  51. --[[
  52. TopView/BattleTime/LeftBattleTime
  53. --]]
  54. local tmp = Root:Find("TopView/BattleTime/LeftBattleTime").gameObject
  55. if tolua.getpeer(tmp) == nil then
  56. tolua.setpeer(tmp, {})
  57. end
  58. self.leftTime = tmp
  59. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  60. end
  61. ---@private
  62. function UIExpeditionBattleView:InitGenerate__3(Root, data)
  63. --[[
  64. TopView/BattleTime/infinite
  65. --]]
  66. local tmp = Root:Find("TopView/BattleTime/infinite").gameObject
  67. if tolua.getpeer(tmp) == nil then
  68. tolua.setpeer(tmp, {})
  69. end
  70. self.infinite = tmp
  71. end
  72. ---@private
  73. function UIExpeditionBattleView:InitGenerate__4(Root, data)
  74. --[[
  75. TopView/StageNumber/Stage
  76. --]]
  77. local tmp = Root:Find("TopView/StageNumber/Stage").gameObject
  78. if tolua.getpeer(tmp) == nil then
  79. tolua.setpeer(tmp, {})
  80. end
  81. self.curLevel = tmp
  82. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  83. end
  84. ---@private
  85. function UIExpeditionBattleView:GenerateDestroy()
  86. if tolua.getpeer(self.mapName) ~= nil then
  87. tolua.setpeer(self.mapName, nil)
  88. end
  89. self.mapName = nil
  90. if tolua.getpeer(self.leftTime) ~= nil then
  91. tolua.setpeer(self.leftTime, nil)
  92. end
  93. self.leftTime = nil
  94. if tolua.getpeer(self.infinite) ~= nil then
  95. tolua.setpeer(self.infinite, nil)
  96. end
  97. self.infinite = nil
  98. if tolua.getpeer(self.curLevel) ~= nil then
  99. tolua.setpeer(self.curLevel, nil)
  100. end
  101. self.curLevel = nil
  102. self.transform = nil
  103. self.gameObject = nil
  104. self.inited = false
  105. end
  106. return UIExpeditionBattleView