UIExchangeCodeView_Generate.lua 4.9 KB

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