UIQuickBattleView_Generate.lua 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. ---@class UIQuickBattle__Generate_LeftTimesLbl
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class UIQuickBattle__Generate_StartBtn
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public button UnityEngine.UI.Button
  7. ---@class UIQuickBattle__Generate_StartBtnLbl
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public text UnityEngine.UI.Text
  10. ---@class UIQuickBattle__Generate_CloseBtn
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public button UnityEngine.UI.Button
  13. ---@class UIQuickBattle__Generate_AnyBtn
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public button UnityEngine.UI.Button
  16. ---@class UIQuickBattle__Generate_uIAnimator
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public animator UnityEngine.Animator
  19. ---@class UIQuickBattle__Generate
  20. ---@field private gameObject UnityEngine.GameObject
  21. ---@field private transform UnityEngine.Transform
  22. ---@field private uIAnimator UIQuickBattle__Generate_uIAnimator
  23. ---@field private AnyBtn UIQuickBattle__Generate_AnyBtn
  24. ---@field private window UnityEngine.GameObject
  25. ---@field private CloseBtn UIQuickBattle__Generate_CloseBtn
  26. ---@field private StartBtnLbl UIQuickBattle__Generate_StartBtnLbl
  27. ---@field private StartBtn UIQuickBattle__Generate_StartBtn
  28. ---@field private LeftTimesLbl UIQuickBattle__Generate_LeftTimesLbl
  29. local UIQuickBattleView = class("UIQuickBattleView", require("UIViewBase"))
  30. function UIQuickBattleView:ctor()
  31. end
  32. ---@private
  33. function UIQuickBattleView:SetActive(result)
  34. self.gameObject:SetActive(result)
  35. end
  36. ---@private
  37. function UIQuickBattleView:InitGenerate(Root, data)
  38. self.transform = Root
  39. self.inited = true
  40. if self.super.Init then
  41. self.super.Init(self)
  42. end
  43. local tmp
  44. self:InitGenerate__1(Root,data)
  45. self:InitGenerate__2(Root,data)
  46. self:InitGenerate__3(Root,data)
  47. self:InitGenerate__4(Root,data)
  48. self:InitGenerate__5(Root,data)
  49. self:InitGenerate__6(Root,data)
  50. self:InitGenerate__7(Root,data)
  51. end
  52. ---@private
  53. function UIQuickBattleView:InitGenerate__1(Root, data)
  54. --[[
  55. UIAnimator
  56. --]]
  57. local tmp = Root:Find("UIAnimator").gameObject
  58. if tolua.getpeer(tmp) == nil then
  59. tolua.setpeer(tmp, {})
  60. end
  61. self.uIAnimator = tmp
  62. tmp.animator = tmp:GetComponent(Enum.TypeInfo.Animator)
  63. tmp.animator.logWarnings = false
  64. end
  65. ---@private
  66. function UIQuickBattleView:InitGenerate__2(Root, data)
  67. --[[
  68. UIAnimator/Alpha
  69. --]]
  70. local tmp = Root:Find("UIAnimator/Alpha").gameObject
  71. if tolua.getpeer(tmp) == nil then
  72. tolua.setpeer(tmp, {})
  73. end
  74. self.AnyBtn = tmp
  75. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  76. end
  77. ---@private
  78. function UIQuickBattleView:InitGenerate__3(Root, data)
  79. --[[
  80. UIAnimator/Window
  81. --]]
  82. local tmp = Root:Find("UIAnimator/Window").gameObject
  83. if tolua.getpeer(tmp) == nil then
  84. tolua.setpeer(tmp, {})
  85. end
  86. self.window = tmp
  87. end
  88. ---@private
  89. function UIQuickBattleView:InitGenerate__4(Root, data)
  90. --[[
  91. UIAnimator/Window/BG/CloseBox/BtnClose
  92. --]]
  93. local tmp = Root:Find("UIAnimator/Window/BG/CloseBox/BtnClose").gameObject
  94. if tolua.getpeer(tmp) == nil then
  95. tolua.setpeer(tmp, {})
  96. end
  97. self.CloseBtn = tmp
  98. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  99. end
  100. ---@private
  101. function UIQuickBattleView:InitGenerate__5(Root, data)
  102. --[[
  103. UIAnimator/Window/BG/BottomBox/CostBox/CostNumber
  104. --]]
  105. local tmp = Root:Find("UIAnimator/Window/BG/BottomBox/CostBox/CostNumber").gameObject
  106. if tolua.getpeer(tmp) == nil then
  107. tolua.setpeer(tmp, {})
  108. end
  109. self.StartBtnLbl = tmp
  110. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  111. end
  112. ---@private
  113. function UIQuickBattleView:InitGenerate__6(Root, data)
  114. --[[
  115. UIAnimator/Window/BG/BottomBox/StartBtn
  116. --]]
  117. local tmp = Root:Find("UIAnimator/Window/BG/BottomBox/StartBtn").gameObject
  118. if tolua.getpeer(tmp) == nil then
  119. tolua.setpeer(tmp, {})
  120. end
  121. self.StartBtn = tmp
  122. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  123. end
  124. ---@private
  125. function UIQuickBattleView:InitGenerate__7(Root, data)
  126. --[[
  127. UIAnimator/Window/BG/TimingBox/TalkBox/Times/LeftTimesLbl
  128. --]]
  129. local tmp = Root:Find("UIAnimator/Window/BG/TimingBox/TalkBox/Times/LeftTimesLbl").gameObject
  130. if tolua.getpeer(tmp) == nil then
  131. tolua.setpeer(tmp, {})
  132. end
  133. self.LeftTimesLbl = tmp
  134. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  135. end
  136. ---@private
  137. function UIQuickBattleView:GenerateDestroy()
  138. if tolua.getpeer(self.uIAnimator) ~= nil then
  139. tolua.setpeer(self.uIAnimator, nil)
  140. end
  141. self.uIAnimator = nil
  142. if tolua.getpeer(self.AnyBtn) ~= nil then
  143. tolua.setpeer(self.AnyBtn, nil)
  144. end
  145. self.AnyBtn = nil
  146. if tolua.getpeer(self.window) ~= nil then
  147. tolua.setpeer(self.window, nil)
  148. end
  149. self.window = nil
  150. if tolua.getpeer(self.CloseBtn) ~= nil then
  151. tolua.setpeer(self.CloseBtn, nil)
  152. end
  153. self.CloseBtn = nil
  154. if tolua.getpeer(self.StartBtnLbl) ~= nil then
  155. tolua.setpeer(self.StartBtnLbl, nil)
  156. end
  157. self.StartBtnLbl = nil
  158. if tolua.getpeer(self.StartBtn) ~= nil then
  159. tolua.setpeer(self.StartBtn, nil)
  160. end
  161. self.StartBtn = nil
  162. if tolua.getpeer(self.LeftTimesLbl) ~= nil then
  163. tolua.setpeer(self.LeftTimesLbl, nil)
  164. end
  165. self.LeftTimesLbl = nil
  166. self.transform = nil
  167. self.gameObject = nil
  168. self.inited = false
  169. end
  170. return UIQuickBattleView