UIGuideView_Generate.lua 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ---@class UIGuide__Generate_arrow
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public rectTransform UnityEngine.RectTransform
  4. ---@class UIGuide__Generate_arrow_bg
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public rectTransform UnityEngine.RectTransform
  7. ---@class UIGuide__Generate_bg
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public image UnityEngine.UI.Image
  10. ---@class UIGuide__Generate
  11. ---@field private gameObject UnityEngine.GameObject
  12. ---@field private transform UnityEngine.Transform
  13. ---@field private uIEventHandler UIEventHandler
  14. ---@field private bg UIGuide__Generate_bg
  15. ---@field private arrow_bg UIGuide__Generate_arrow_bg
  16. ---@field private arrow UIGuide__Generate_arrow
  17. local UIGuideView = class("UIGuideView", require("UIViewBase"))
  18. function UIGuideView:ctor()
  19. end
  20. ---@private
  21. function UIGuideView:SetActive(result)
  22. self.gameObject:SetActive(result)
  23. end
  24. ---@private
  25. function UIGuideView: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 UIGuideView:InitGenerate__1(Root, data)
  39. --[[
  40. Root
  41. --]]
  42. self.uIEventHandler = Root:GetComponent(Enum.TypeInfo.UIEventHandler)
  43. end
  44. ---@private
  45. function UIGuideView:InitGenerate__2(Root, data)
  46. --[[
  47. bg
  48. --]]
  49. local tmp = Root:Find("bg").gameObject
  50. if tolua.getpeer(tmp) == nil then
  51. tolua.setpeer(tmp, {})
  52. end
  53. self.bg = tmp
  54. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  55. end
  56. ---@private
  57. function UIGuideView:InitGenerate__3(Root, data)
  58. --[[
  59. arrow_bg
  60. --]]
  61. local tmp = Root:Find("arrow_bg").gameObject
  62. if tolua.getpeer(tmp) == nil then
  63. tolua.setpeer(tmp, {})
  64. end
  65. self.arrow_bg = tmp
  66. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  67. end
  68. ---@private
  69. function UIGuideView:InitGenerate__4(Root, data)
  70. --[[
  71. arrow_bg/arrow
  72. --]]
  73. local tmp = Root:Find("arrow_bg/arrow").gameObject
  74. if tolua.getpeer(tmp) == nil then
  75. tolua.setpeer(tmp, {})
  76. end
  77. self.arrow = tmp
  78. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  79. end
  80. ---@private
  81. function UIGuideView:GenerateDestroy()
  82. if tolua.getpeer(self.bg) ~= nil then
  83. tolua.setpeer(self.bg, nil)
  84. end
  85. self.bg = nil
  86. if tolua.getpeer(self.arrow_bg) ~= nil then
  87. tolua.setpeer(self.arrow_bg, nil)
  88. end
  89. self.arrow_bg = nil
  90. if tolua.getpeer(self.arrow) ~= nil then
  91. tolua.setpeer(self.arrow, nil)
  92. end
  93. self.arrow = nil
  94. self.transform = nil
  95. self.gameObject = nil
  96. self.inited = false
  97. end
  98. return UIGuideView