UILuckyEggAnimView_Generate.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. ---@class UILuckyEggAnim__Generate_white
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public image UnityEngine.UI.Image
  4. ---@class UILuckyEggAnim__Generate_drawRect
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public uIEventTriggerListener UIEventTriggerListener
  7. ---@class UILuckyEggAnim__Generate_AnyBtn
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public button UnityEngine.UI.Button
  10. ---@class UILuckyEggAnim__Generate_uIAnimator
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public animator UnityEngine.Animator
  13. ---@class UILuckyEggAnim__Generate
  14. ---@field private gameObject UnityEngine.GameObject
  15. ---@field private transform UnityEngine.Transform
  16. ---@field private uIAnimator UILuckyEggAnim__Generate_uIAnimator
  17. ---@field private AnyBtn UILuckyEggAnim__Generate_AnyBtn
  18. ---@field private drawRect UILuckyEggAnim__Generate_drawRect
  19. ---@field private guide UnityEngine.GameObject
  20. ---@field private white UILuckyEggAnim__Generate_white
  21. local UILuckyEggAnimView = class("UILuckyEggAnimView", require("UIViewBase"))
  22. function UILuckyEggAnimView:ctor()
  23. end
  24. ---@private
  25. function UILuckyEggAnimView:SetActive(result)
  26. self.gameObject:SetActive(result)
  27. end
  28. ---@private
  29. function UILuckyEggAnimView:InitGenerate(Root, data)
  30. self.transform = Root
  31. self.inited = true
  32. if self.super.Init then
  33. self.super.Init(self)
  34. end
  35. local tmp
  36. self:InitGenerate__1(Root,data)
  37. self:InitGenerate__2(Root,data)
  38. self:InitGenerate__3(Root,data)
  39. self:InitGenerate__4(Root,data)
  40. self:InitGenerate__5(Root,data)
  41. end
  42. ---@private
  43. function UILuckyEggAnimView:InitGenerate__1(Root, data)
  44. --[[
  45. UIAnimator
  46. --]]
  47. local tmp = Root:Find("UIAnimator").gameObject
  48. if tolua.getpeer(tmp) == nil then
  49. tolua.setpeer(tmp, {})
  50. end
  51. self.uIAnimator = tmp
  52. tmp.animator = tmp:GetComponent(Enum.TypeInfo.Animator)
  53. tmp.animator.logWarnings = false
  54. end
  55. ---@private
  56. function UILuckyEggAnimView:InitGenerate__2(Root, data)
  57. --[[
  58. UIAnimator/Alpha
  59. --]]
  60. local tmp = Root:Find("UIAnimator/Alpha").gameObject
  61. if tolua.getpeer(tmp) == nil then
  62. tolua.setpeer(tmp, {})
  63. end
  64. self.AnyBtn = tmp
  65. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  66. end
  67. ---@private
  68. function UILuckyEggAnimView:InitGenerate__3(Root, data)
  69. --[[
  70. UIAnimator/Window/DrawRect
  71. --]]
  72. local tmp = Root:Find("UIAnimator/Window/DrawRect").gameObject
  73. if tolua.getpeer(tmp) == nil then
  74. tolua.setpeer(tmp, {})
  75. end
  76. self.drawRect = tmp
  77. tmp.uIEventTriggerListener = tmp:GetComponent(Enum.TypeInfo.UIEventTriggerListener)
  78. end
  79. ---@private
  80. function UILuckyEggAnimView:InitGenerate__4(Root, data)
  81. --[[
  82. UIAnimator/Window/Guide
  83. --]]
  84. local tmp = Root:Find("UIAnimator/Window/Guide").gameObject
  85. if tolua.getpeer(tmp) == nil then
  86. tolua.setpeer(tmp, {})
  87. end
  88. self.guide = tmp
  89. self.guide:SetActive(false)
  90. end
  91. ---@private
  92. function UILuckyEggAnimView:InitGenerate__5(Root, data)
  93. --[[
  94. UIAnimator/Window/White
  95. --]]
  96. local tmp = Root:Find("UIAnimator/Window/White").gameObject
  97. if tolua.getpeer(tmp) == nil then
  98. tolua.setpeer(tmp, {})
  99. end
  100. self.white = tmp
  101. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  102. end
  103. ---@private
  104. function UILuckyEggAnimView:GenerateDestroy()
  105. if tolua.getpeer(self.uIAnimator) ~= nil then
  106. tolua.setpeer(self.uIAnimator, nil)
  107. end
  108. self.uIAnimator = nil
  109. if tolua.getpeer(self.AnyBtn) ~= nil then
  110. tolua.setpeer(self.AnyBtn, nil)
  111. end
  112. self.AnyBtn = nil
  113. if tolua.getpeer(self.drawRect) ~= nil then
  114. tolua.setpeer(self.drawRect, nil)
  115. end
  116. self.drawRect = nil
  117. if tolua.getpeer(self.guide) ~= nil then
  118. tolua.setpeer(self.guide, nil)
  119. end
  120. self.guide = nil
  121. if tolua.getpeer(self.white) ~= nil then
  122. tolua.setpeer(self.white, nil)
  123. end
  124. self.white = nil
  125. self.transform = nil
  126. self.gameObject = nil
  127. self.inited = false
  128. end
  129. return UILuckyEggAnimView