IdolSuccessTipsView_Generate.lua 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. ---@class IdolSuccessTips__Generate_particle
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public uIParticle UIExtensions.UIParticle
  4. ---@class IdolSuccessTips__Generate_AnyBtn
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public button UnityEngine.UI.Button
  7. ---@class IdolSuccessTips__Generate
  8. ---@field private gameObject UnityEngine.GameObject
  9. ---@field private transform UnityEngine.Transform
  10. ---@field private rectTransform UnityEngine.RectTransform
  11. ---@field private loopVerticalScrollRect UnityEngine.UI.LoopVerticalScrollRect
  12. ---@field private canvasGroup UnityEngine.CanvasGroup
  13. ---@field private AnyBtn IdolSuccessTips__Generate_AnyBtn
  14. ---@field private particle IdolSuccessTips__Generate_particle
  15. local IdolSuccessTipsView = class("IdolSuccessTipsView", require("UIViewBase"))
  16. function IdolSuccessTipsView:ctor()
  17. end
  18. ---@private
  19. function IdolSuccessTipsView:SetActive(result)
  20. self.gameObject:SetActive(result)
  21. end
  22. ---@private
  23. function IdolSuccessTipsView:InitGenerate(Root, data)
  24. self.transform = Root
  25. self.inited = true
  26. if self.super.Init then
  27. self.super.Init(self)
  28. end
  29. local tmp
  30. self:InitGenerate__1(Root,data)
  31. self:InitGenerate__2(Root,data)
  32. self:InitGenerate__3(Root,data)
  33. end
  34. ---@private
  35. function IdolSuccessTipsView:InitGenerate__1(Root, data)
  36. --[[
  37. Root
  38. --]]
  39. self.rectTransform = Root:GetComponent(Enum.TypeInfo.RectTransform)
  40. self.loopVerticalScrollRect = Root:GetComponent(Enum.TypeInfo.LoopVerticalScrollRect)
  41. self.canvasGroup = Root:GetComponent(Enum.TypeInfo.CanvasGroup)
  42. end
  43. ---@private
  44. function IdolSuccessTipsView:InitGenerate__2(Root, data)
  45. --[[
  46. Alpha
  47. --]]
  48. local tmp = Root:Find("Alpha").gameObject
  49. if tolua.getpeer(tmp) == nil then
  50. tolua.setpeer(tmp, {})
  51. end
  52. self.AnyBtn = tmp
  53. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  54. end
  55. ---@private
  56. function IdolSuccessTipsView:InitGenerate__3(Root, data)
  57. --[[
  58. particle
  59. --]]
  60. local tmp = Root:Find("particle").gameObject
  61. if tolua.getpeer(tmp) == nil then
  62. tolua.setpeer(tmp, {})
  63. end
  64. self.particle = tmp
  65. tmp.uIParticle = tmp:GetComponent(Enum.TypeInfo.UIParticle)
  66. end
  67. ---@private
  68. function IdolSuccessTipsView:GenerateDestroy()
  69. if tolua.getpeer(self.AnyBtn) ~= nil then
  70. tolua.setpeer(self.AnyBtn, nil)
  71. end
  72. self.AnyBtn = nil
  73. if tolua.getpeer(self.particle) ~= nil then
  74. tolua.setpeer(self.particle, nil)
  75. end
  76. self.particle = nil
  77. self.transform = nil
  78. self.gameObject = nil
  79. self.inited = false
  80. end
  81. return IdolSuccessTipsView