ArtifactPropertyItem_Generate.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. ---@class ArtifactPropertyItem__Generate_btnActivation
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public button UnityEngine.UI.Button
  4. ---@class ArtifactPropertyItem__Generate_dsc
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public text UnityEngine.UI.Text
  7. ---@class ArtifactPropertyItem__Generate
  8. ---@field private gameObject UnityEngine.GameObject
  9. ---@field private transform UnityEngine.Transform
  10. ---@field private button UnityEngine.UI.Button
  11. ---@field private star UnityEngine.GameObject
  12. ---@field private dsc ArtifactPropertyItem__Generate_dsc
  13. ---@field private btnActivation ArtifactPropertyItem__Generate_btnActivation
  14. ---@field private rp UnityEngine.GameObject
  15. ---@field private bg UnityEngine.GameObject
  16. ---@field private hart UnityEngine.GameObject
  17. local ArtifactPropertyItemView = class("ArtifactPropertyItemView")
  18. function ArtifactPropertyItemView:ctor()
  19. end
  20. ---@private
  21. function ArtifactPropertyItemView:SetActive(result)
  22. self.gameObject:SetActive(result)
  23. end
  24. ---@private
  25. function ArtifactPropertyItemView:InitGenerate(Root, data)
  26. self.transform = Root
  27. self.inited = true
  28. local tmp
  29. self:InitGenerate__1(Root,data)
  30. self:InitGenerate__2(Root,data)
  31. self:InitGenerate__3(Root,data)
  32. self:InitGenerate__4(Root,data)
  33. self:InitGenerate__5(Root,data)
  34. self:InitGenerate__6(Root,data)
  35. self:InitGenerate__7(Root,data)
  36. end
  37. ---@private
  38. function ArtifactPropertyItemView:InitGenerate__1(Root, data)
  39. --[[
  40. Root
  41. --]]
  42. self.button = Root:GetComponent(Enum.TypeInfo.Button)
  43. end
  44. ---@private
  45. function ArtifactPropertyItemView:InitGenerate__2(Root, data)
  46. --[[
  47. Star
  48. --]]
  49. local tmp = Root:Find("Star").gameObject
  50. if tolua.getpeer(tmp) == nil then
  51. tolua.setpeer(tmp, {})
  52. end
  53. self.star = tmp
  54. end
  55. ---@private
  56. function ArtifactPropertyItemView:InitGenerate__3(Root, data)
  57. --[[
  58. Dsc
  59. --]]
  60. local tmp = Root:Find("Dsc").gameObject
  61. if tolua.getpeer(tmp) == nil then
  62. tolua.setpeer(tmp, {})
  63. end
  64. self.dsc = tmp
  65. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  66. end
  67. ---@private
  68. function ArtifactPropertyItemView:InitGenerate__4(Root, data)
  69. --[[
  70. BtnActivation
  71. --]]
  72. local tmp = Root:Find("BtnActivation").gameObject
  73. if tolua.getpeer(tmp) == nil then
  74. tolua.setpeer(tmp, {})
  75. end
  76. self.btnActivation = tmp
  77. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  78. end
  79. ---@private
  80. function ArtifactPropertyItemView:InitGenerate__5(Root, data)
  81. --[[
  82. UIRedNotesRP
  83. --]]
  84. local tmp = Root:Find("UIRedNotesRP").gameObject
  85. if tolua.getpeer(tmp) == nil then
  86. tolua.setpeer(tmp, {})
  87. end
  88. self.rp = tmp
  89. end
  90. ---@private
  91. function ArtifactPropertyItemView:InitGenerate__6(Root, data)
  92. --[[
  93. UIRedNotesRP/RedPoint/Bg
  94. --]]
  95. local tmp = Root:Find("UIRedNotesRP/RedPoint/Bg").gameObject
  96. if tolua.getpeer(tmp) == nil then
  97. tolua.setpeer(tmp, {})
  98. end
  99. self.bg = tmp
  100. end
  101. ---@private
  102. function ArtifactPropertyItemView:InitGenerate__7(Root, data)
  103. --[[
  104. UIRedNotesRP/RedPoint/Hart
  105. --]]
  106. local tmp = Root:Find("UIRedNotesRP/RedPoint/Hart").gameObject
  107. if tolua.getpeer(tmp) == nil then
  108. tolua.setpeer(tmp, {})
  109. end
  110. self.hart = tmp
  111. end
  112. ---@private
  113. function ArtifactPropertyItemView:GenerateDestroy()
  114. if tolua.getpeer(self.star) ~= nil then
  115. tolua.setpeer(self.star, nil)
  116. end
  117. self.star = nil
  118. if tolua.getpeer(self.dsc) ~= nil then
  119. tolua.setpeer(self.dsc, nil)
  120. end
  121. self.dsc = nil
  122. if tolua.getpeer(self.btnActivation) ~= nil then
  123. tolua.setpeer(self.btnActivation, nil)
  124. end
  125. self.btnActivation = nil
  126. if tolua.getpeer(self.rp) ~= nil then
  127. tolua.setpeer(self.rp, nil)
  128. end
  129. self.rp = nil
  130. if tolua.getpeer(self.bg) ~= nil then
  131. tolua.setpeer(self.bg, nil)
  132. end
  133. self.bg = nil
  134. if tolua.getpeer(self.hart) ~= nil then
  135. tolua.setpeer(self.hart, nil)
  136. end
  137. self.hart = nil
  138. self.transform = nil
  139. self.gameObject = nil
  140. self.inited = false
  141. end
  142. return ArtifactPropertyItemView