PetCollect_Generate.lua 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. ---@class PetCollect__Generate_nature
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public image UnityEngine.UI.Image
  4. ---@class PetCollect__Generate_frame
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public image UnityEngine.UI.Image
  7. ---@class PetCollect__Generate_icon
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public image UnityEngine.UI.Image
  10. ---@field public uIEventTriggerListener UIEventTriggerListener
  11. ---@class PetCollect__Generate_bg
  12. ---@field public gameObject UnityEngine.GameObject
  13. ---@field public image UnityEngine.UI.Image
  14. ---@field public button UnityEngine.UI.Button
  15. ---@class PetCollect__Generate_shadow
  16. ---@field public gameObject UnityEngine.GameObject
  17. ---@field public image UnityEngine.UI.Image
  18. ---@field public button UnityEngine.UI.Button
  19. ---@class PetCollect__Generate
  20. ---@field private gameObject UnityEngine.GameObject
  21. ---@field private transform UnityEngine.Transform
  22. ---@field private shadow PetCollect__Generate_shadow
  23. ---@field private bg PetCollect__Generate_bg
  24. ---@field private icon PetCollect__Generate_icon
  25. ---@field private frame PetCollect__Generate_frame
  26. ---@field private nature PetCollect__Generate_nature
  27. ---@field private uIRedPointRP UnityEngine.GameObject
  28. ---@field private mask UnityEngine.GameObject
  29. local PetCollectView = class("PetCollectView")
  30. function PetCollectView:ctor()
  31. end
  32. ---@private
  33. function PetCollectView:SetActive(result)
  34. self.gameObject:SetActive(result)
  35. end
  36. ---@private
  37. function PetCollectView:InitGenerate(Root, data)
  38. self.transform = Root
  39. self.inited = true
  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 PetCollectView:InitGenerate__1(Root, data)
  52. --[[
  53. Root
  54. --]]
  55. end
  56. ---@private
  57. function PetCollectView:InitGenerate__2(Root, data)
  58. --[[
  59. shadow
  60. --]]
  61. local tmp = Root:Find("shadow").gameObject
  62. if tolua.getpeer(tmp) == nil then
  63. tolua.setpeer(tmp, {})
  64. end
  65. self.shadow = tmp
  66. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  67. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  68. end
  69. ---@private
  70. function PetCollectView:InitGenerate__3(Root, data)
  71. --[[
  72. bg
  73. --]]
  74. local tmp = Root:Find("bg").gameObject
  75. if tolua.getpeer(tmp) == nil then
  76. tolua.setpeer(tmp, {})
  77. end
  78. self.bg = tmp
  79. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  80. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  81. end
  82. ---@private
  83. function PetCollectView:InitGenerate__4(Root, data)
  84. --[[
  85. Icon
  86. --]]
  87. local tmp = Root:Find("Icon").gameObject
  88. if tolua.getpeer(tmp) == nil then
  89. tolua.setpeer(tmp, {})
  90. end
  91. self.icon = tmp
  92. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  93. tmp.uIEventTriggerListener = tmp:GetComponent(Enum.TypeInfo.UIEventTriggerListener)
  94. end
  95. ---@private
  96. function PetCollectView:InitGenerate__5(Root, data)
  97. --[[
  98. Frame
  99. --]]
  100. local tmp = Root:Find("Frame").gameObject
  101. if tolua.getpeer(tmp) == nil then
  102. tolua.setpeer(tmp, {})
  103. end
  104. self.frame = tmp
  105. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  106. end
  107. ---@private
  108. function PetCollectView:InitGenerate__6(Root, data)
  109. --[[
  110. Nature
  111. --]]
  112. local tmp = Root:Find("Nature").gameObject
  113. if tolua.getpeer(tmp) == nil then
  114. tolua.setpeer(tmp, {})
  115. end
  116. self.nature = tmp
  117. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  118. end
  119. ---@private
  120. function PetCollectView:InitGenerate__7(Root, data)
  121. --[[
  122. UIRedPointRP
  123. --]]
  124. local tmp = Root:Find("UIRedPointRP").gameObject
  125. if tolua.getpeer(tmp) == nil then
  126. tolua.setpeer(tmp, {})
  127. end
  128. self.uIRedPointRP = tmp
  129. end
  130. ---@private
  131. function PetCollectView:InitGenerate__8(Root, data)
  132. --[[
  133. Mask
  134. --]]
  135. local tmp = Root:Find("Mask").gameObject
  136. if tolua.getpeer(tmp) == nil then
  137. tolua.setpeer(tmp, {})
  138. end
  139. self.mask = tmp
  140. end
  141. ---@private
  142. function PetCollectView:GenerateDestroy()
  143. if tolua.getpeer(self.shadow) ~= nil then
  144. tolua.setpeer(self.shadow, nil)
  145. end
  146. self.shadow = nil
  147. if tolua.getpeer(self.bg) ~= nil then
  148. tolua.setpeer(self.bg, nil)
  149. end
  150. self.bg = nil
  151. if tolua.getpeer(self.icon) ~= nil then
  152. tolua.setpeer(self.icon, nil)
  153. end
  154. self.icon = nil
  155. if tolua.getpeer(self.frame) ~= nil then
  156. tolua.setpeer(self.frame, nil)
  157. end
  158. self.frame = nil
  159. if tolua.getpeer(self.nature) ~= nil then
  160. tolua.setpeer(self.nature, nil)
  161. end
  162. self.nature = nil
  163. if tolua.getpeer(self.uIRedPointRP) ~= nil then
  164. tolua.setpeer(self.uIRedPointRP, nil)
  165. end
  166. self.uIRedPointRP = nil
  167. if tolua.getpeer(self.mask) ~= nil then
  168. tolua.setpeer(self.mask, nil)
  169. end
  170. self.mask = nil
  171. self.transform = nil
  172. self.gameObject = nil
  173. self.inited = false
  174. end
  175. return PetCollectView