UIPopGotSingleView_Generate.lua 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. ---@class UIPopGotSingle__Generate_icon
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public image UnityEngine.UI.Image
  4. ---@class UIPopGotSingle__Generate_itemIcon
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public rectTransform UnityEngine.RectTransform
  7. ---@class UIPopGotSingle__Generate_titleText
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public uILocalizeScript UILocalizeScript
  10. ---@class UIPopGotSingle__Generate_nameText
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public uILocalizeScript UILocalizeScript
  13. ---@class UIPopGotSingle__Generate_AnyBtn
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public button UnityEngine.UI.Button
  16. ---@class UIPopGotSingle__Generate_uIAnimator
  17. ---@field public gameObject UnityEngine.GameObject
  18. ---@field public animator UnityEngine.Animator
  19. ---@class UIPopGotSingle__Generate
  20. ---@field private gameObject UnityEngine.GameObject
  21. ---@field private transform UnityEngine.Transform
  22. ---@field private uIAnimator UIPopGotSingle__Generate_uIAnimator
  23. ---@field private AnyBtn UIPopGotSingle__Generate_AnyBtn
  24. ---@field private nameText UIPopGotSingle__Generate_nameText
  25. ---@field private titleText UIPopGotSingle__Generate_titleText
  26. ---@field private itemIcon UIPopGotSingle__Generate_itemIcon
  27. ---@field private icon UIPopGotSingle__Generate_icon
  28. local UIPopGotSingleView = class("UIPopGotSingleView", require("UIViewBase"))
  29. function UIPopGotSingleView:ctor()
  30. end
  31. ---@private
  32. function UIPopGotSingleView:SetActive(result)
  33. self.gameObject:SetActive(result)
  34. end
  35. ---@private
  36. function UIPopGotSingleView:InitGenerate(Root, data)
  37. self.transform = Root
  38. self.inited = true
  39. if self.super.Init then
  40. self.super.Init(self)
  41. end
  42. local tmp
  43. self:InitGenerate__1(Root,data)
  44. self:InitGenerate__2(Root,data)
  45. self:InitGenerate__3(Root,data)
  46. self:InitGenerate__4(Root,data)
  47. self:InitGenerate__5(Root,data)
  48. self:InitGenerate__6(Root,data)
  49. end
  50. ---@private
  51. function UIPopGotSingleView:InitGenerate__1(Root, data)
  52. --[[
  53. UIAnimator
  54. --]]
  55. local tmp = Root:Find("UIAnimator").gameObject
  56. if tolua.getpeer(tmp) == nil then
  57. tolua.setpeer(tmp, {})
  58. end
  59. self.uIAnimator = tmp
  60. tmp.animator = tmp:GetComponent(Enum.TypeInfo.Animator)
  61. tmp.animator.logWarnings = false
  62. end
  63. ---@private
  64. function UIPopGotSingleView:InitGenerate__2(Root, data)
  65. --[[
  66. UIAnimator/Alpha
  67. --]]
  68. local tmp = Root:Find("UIAnimator/Alpha").gameObject
  69. if tolua.getpeer(tmp) == nil then
  70. tolua.setpeer(tmp, {})
  71. end
  72. self.AnyBtn = tmp
  73. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  74. end
  75. ---@private
  76. function UIPopGotSingleView:InitGenerate__3(Root, data)
  77. --[[
  78. UIAnimator/Window/NameText
  79. --]]
  80. local tmp = Root:Find("UIAnimator/Window/NameText").gameObject
  81. if tolua.getpeer(tmp) == nil then
  82. tolua.setpeer(tmp, {})
  83. end
  84. self.nameText = tmp
  85. tmp.uILocalizeScript = tmp:GetComponent(Enum.TypeInfo.UILocalizeScript)
  86. end
  87. ---@private
  88. function UIPopGotSingleView:InitGenerate__4(Root, data)
  89. --[[
  90. UIAnimator/Window/TitleText
  91. --]]
  92. local tmp = Root:Find("UIAnimator/Window/TitleText").gameObject
  93. if tolua.getpeer(tmp) == nil then
  94. tolua.setpeer(tmp, {})
  95. end
  96. self.titleText = tmp
  97. tmp.uILocalizeScript = tmp:GetComponent(Enum.TypeInfo.UILocalizeScript)
  98. end
  99. ---@private
  100. function UIPopGotSingleView:InitGenerate__5(Root, data)
  101. --[[
  102. UIAnimator/ItemIcon
  103. --]]
  104. local tmp = Root:Find("UIAnimator/ItemIcon").gameObject
  105. if tolua.getpeer(tmp) == nil then
  106. tolua.setpeer(tmp, {})
  107. end
  108. self.itemIcon = tmp
  109. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  110. end
  111. ---@private
  112. function UIPopGotSingleView:InitGenerate__6(Root, data)
  113. --[[
  114. UIAnimator/ItemIcon/Icon
  115. --]]
  116. local tmp = Root:Find("UIAnimator/ItemIcon/Icon").gameObject
  117. if tolua.getpeer(tmp) == nil then
  118. tolua.setpeer(tmp, {})
  119. end
  120. self.icon = tmp
  121. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  122. end
  123. ---@private
  124. function UIPopGotSingleView:GenerateDestroy()
  125. if tolua.getpeer(self.uIAnimator) ~= nil then
  126. tolua.setpeer(self.uIAnimator, nil)
  127. end
  128. self.uIAnimator = nil
  129. if tolua.getpeer(self.AnyBtn) ~= nil then
  130. tolua.setpeer(self.AnyBtn, nil)
  131. end
  132. self.AnyBtn = nil
  133. if tolua.getpeer(self.nameText) ~= nil then
  134. tolua.setpeer(self.nameText, nil)
  135. end
  136. self.nameText = nil
  137. if tolua.getpeer(self.titleText) ~= nil then
  138. tolua.setpeer(self.titleText, nil)
  139. end
  140. self.titleText = nil
  141. if tolua.getpeer(self.itemIcon) ~= nil then
  142. tolua.setpeer(self.itemIcon, nil)
  143. end
  144. self.itemIcon = nil
  145. if tolua.getpeer(self.icon) ~= nil then
  146. tolua.setpeer(self.icon, nil)
  147. end
  148. self.icon = nil
  149. self.transform = nil
  150. self.gameObject = nil
  151. self.inited = false
  152. end
  153. return UIPopGotSingleView