UISuccessTipsView_Generate.lua 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. ---@class UISuccessTips__Generate_particle
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public uIParticle UIExtensions.UIParticle
  4. ---@class UISuccessTips__Generate_nameTxt
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public text UnityEngine.UI.Text
  7. ---@class UISuccessTips__Generate_skillItem
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public rectTransform UnityEngine.RectTransform
  10. ---@class UISuccessTips__Generate_title
  11. ---@field public gameObject UnityEngine.GameObject
  12. ---@field public text TMPro.TextMeshProUGUI
  13. ---@class UISuccessTips__Generate_alpha
  14. ---@field public gameObject UnityEngine.GameObject
  15. ---@field public button UnityEngine.UI.Button
  16. ---@class UISuccessTips__Generate
  17. ---@field private gameObject UnityEngine.GameObject
  18. ---@field private transform UnityEngine.Transform
  19. ---@field private alpha UISuccessTips__Generate_alpha
  20. ---@field private title UISuccessTips__Generate_title
  21. ---@field private skillItem UISuccessTips__Generate_skillItem
  22. ---@field private nameTxt UISuccessTips__Generate_nameTxt
  23. ---@field private particle UISuccessTips__Generate_particle
  24. local UISuccessTipsView = class("UISuccessTipsView", require("UIViewBase"))
  25. function UISuccessTipsView:ctor()
  26. end
  27. ---@private
  28. function UISuccessTipsView:SetActive(result)
  29. self.gameObject:SetActive(result)
  30. end
  31. ---@private
  32. function UISuccessTipsView:InitGenerate(Root, data)
  33. self.transform = Root
  34. self.inited = true
  35. if self.super.Init then
  36. self.super.Init(self)
  37. end
  38. local tmp
  39. self:InitGenerate__1(Root,data)
  40. self:InitGenerate__2(Root,data)
  41. self:InitGenerate__3(Root,data)
  42. self:InitGenerate__4(Root,data)
  43. self:InitGenerate__5(Root,data)
  44. end
  45. ---@private
  46. function UISuccessTipsView:InitGenerate__1(Root, data)
  47. --[[
  48. Alpha
  49. --]]
  50. local tmp = Root:Find("Alpha").gameObject
  51. if tolua.getpeer(tmp) == nil then
  52. tolua.setpeer(tmp, {})
  53. end
  54. self.alpha = tmp
  55. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  56. end
  57. ---@private
  58. function UISuccessTipsView:InitGenerate__2(Root, data)
  59. --[[
  60. Window/BG/Title/title
  61. --]]
  62. local tmp = Root:Find("Window/BG/Title/title").gameObject
  63. if tolua.getpeer(tmp) == nil then
  64. tolua.setpeer(tmp, {})
  65. end
  66. self.title = tmp
  67. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  68. end
  69. ---@private
  70. function UISuccessTipsView:InitGenerate__3(Root, data)
  71. --[[
  72. Window/BG/Content/Icon/SkillItem
  73. --]]
  74. local tmp = Root:Find("Window/BG/Content/Icon/SkillItem").gameObject
  75. if tolua.getpeer(tmp) == nil then
  76. tolua.setpeer(tmp, {})
  77. end
  78. self.skillItem = CommonUtil.BindGridViewItem2LuaStatic("SkillItem", tmp)
  79. self.skillItem.prefabName = "SkillItem"
  80. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  81. end
  82. ---@private
  83. function UISuccessTipsView:InitGenerate__4(Root, data)
  84. --[[
  85. Window/BG/Content/Icon/NameTxt
  86. --]]
  87. local tmp = Root:Find("Window/BG/Content/Icon/NameTxt").gameObject
  88. if tolua.getpeer(tmp) == nil then
  89. tolua.setpeer(tmp, {})
  90. end
  91. self.nameTxt = tmp
  92. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  93. end
  94. ---@private
  95. function UISuccessTipsView:InitGenerate__5(Root, data)
  96. --[[
  97. Window/BG/Content/particle
  98. --]]
  99. local tmp = Root:Find("Window/BG/Content/particle").gameObject
  100. if tolua.getpeer(tmp) == nil then
  101. tolua.setpeer(tmp, {})
  102. end
  103. self.particle = tmp
  104. tmp.uIParticle = tmp:GetComponent(Enum.TypeInfo.UIParticle)
  105. end
  106. ---@private
  107. function UISuccessTipsView:GenerateDestroy()
  108. if tolua.getpeer(self.alpha) ~= nil then
  109. tolua.setpeer(self.alpha, nil)
  110. end
  111. self.alpha = nil
  112. if tolua.getpeer(self.title) ~= nil then
  113. tolua.setpeer(self.title, nil)
  114. end
  115. self.title = nil
  116. if self.skillItem.GenerateDestroy ~= nil then
  117. self.skillItem:GenerateDestroy()
  118. end
  119. if tolua.getpeer(self.skillItem) ~= nil then
  120. tolua.setpeer(self.skillItem, nil)
  121. end
  122. self.skillItem = nil
  123. if tolua.getpeer(self.nameTxt) ~= nil then
  124. tolua.setpeer(self.nameTxt, nil)
  125. end
  126. self.nameTxt = nil
  127. if tolua.getpeer(self.particle) ~= nil then
  128. tolua.setpeer(self.particle, nil)
  129. end
  130. self.particle = nil
  131. self.transform = nil
  132. self.gameObject = nil
  133. self.inited = false
  134. end
  135. return UISuccessTipsView