UIClimbingTowerBattleView_Generate.lua 2.6 KB

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