UIVoyageReformingView_Generate.lua 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. ---@class UIVoyageReforming__Generate_AnyBtn
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public button UnityEngine.UI.Button
  4. ---@class UIVoyageReforming__Generate
  5. ---@field private gameObject UnityEngine.GameObject
  6. ---@field private transform UnityEngine.Transform
  7. ---@field private animator UnityEngine.Animator
  8. ---@field private AnyBtn UIVoyageReforming__Generate_AnyBtn
  9. ---@field private fail UnityEngine.GameObject
  10. ---@field private success UnityEngine.GameObject
  11. local UIVoyageReformingView = class("UIVoyageReformingView", require("UIViewBase"))
  12. function UIVoyageReformingView:ctor()
  13. end
  14. ---@private
  15. function UIVoyageReformingView:SetActive(result)
  16. self.gameObject:SetActive(result)
  17. end
  18. ---@private
  19. function UIVoyageReformingView:InitGenerate(Root, data)
  20. self.transform = Root
  21. self.inited = true
  22. if self.super.Init then
  23. self.super.Init(self)
  24. end
  25. local tmp
  26. self:InitGenerate__1(Root,data)
  27. self:InitGenerate__2(Root,data)
  28. self:InitGenerate__3(Root,data)
  29. self:InitGenerate__4(Root,data)
  30. end
  31. ---@private
  32. function UIVoyageReformingView:InitGenerate__1(Root, data)
  33. --[[
  34. Root
  35. --]]
  36. self.animator = Root:GetComponent(Enum.TypeInfo.Animator)
  37. self.animator.logWarnings = false
  38. end
  39. ---@private
  40. function UIVoyageReformingView:InitGenerate__2(Root, data)
  41. --[[
  42. Alpha
  43. --]]
  44. local tmp = Root:Find("Alpha").gameObject
  45. if tolua.getpeer(tmp) == nil then
  46. tolua.setpeer(tmp, {})
  47. end
  48. self.AnyBtn = tmp
  49. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  50. end
  51. ---@private
  52. function UIVoyageReformingView:InitGenerate__3(Root, data)
  53. --[[
  54. Result/Fail
  55. --]]
  56. local tmp = Root:Find("Result/Fail").gameObject
  57. if tolua.getpeer(tmp) == nil then
  58. tolua.setpeer(tmp, {})
  59. end
  60. self.fail = tmp
  61. end
  62. ---@private
  63. function UIVoyageReformingView:InitGenerate__4(Root, data)
  64. --[[
  65. Result/Success
  66. --]]
  67. local tmp = Root:Find("Result/Success").gameObject
  68. if tolua.getpeer(tmp) == nil then
  69. tolua.setpeer(tmp, {})
  70. end
  71. self.success = tmp
  72. end
  73. ---@private
  74. function UIVoyageReformingView:GenerateDestroy()
  75. if tolua.getpeer(self.AnyBtn) ~= nil then
  76. tolua.setpeer(self.AnyBtn, nil)
  77. end
  78. self.AnyBtn = nil
  79. if tolua.getpeer(self.fail) ~= nil then
  80. tolua.setpeer(self.fail, nil)
  81. end
  82. self.fail = nil
  83. if tolua.getpeer(self.success) ~= nil then
  84. tolua.setpeer(self.success, nil)
  85. end
  86. self.success = nil
  87. self.transform = nil
  88. self.gameObject = nil
  89. self.inited = false
  90. end
  91. return UIVoyageReformingView