UINatureInfoView_Generate.lua 2.6 KB

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