GotCoinItem_Generate.lua 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. ---@class GotCoinItem__Generate_jobParCtr
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public uIParticle UIExtensions.UIParticle
  4. ---@class GotCoinItem__Generate_baseParCtr
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public uIParticle UIExtensions.UIParticle
  7. ---@class GotCoinItem__Generate_icon
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public image UnityEngine.UI.Image
  10. ---@class GotCoinItem__Generate
  11. ---@field private gameObject UnityEngine.GameObject
  12. ---@field private transform UnityEngine.Transform
  13. ---@field private icon GotCoinItem__Generate_icon
  14. ---@field private baseParCtr GotCoinItem__Generate_baseParCtr
  15. ---@field private jobParCtr GotCoinItem__Generate_jobParCtr
  16. ---@field private basePar UnityEngine.GameObject
  17. ---@field private jobPar UnityEngine.GameObject
  18. local GotCoinItemView = class("GotCoinItemView")
  19. function GotCoinItemView:ctor()
  20. end
  21. ---@private
  22. function GotCoinItemView:SetActive(result)
  23. self.gameObject:SetActive(result)
  24. end
  25. ---@private
  26. function GotCoinItemView:InitGenerate(Root, data)
  27. self.transform = Root
  28. self.inited = true
  29. local tmp
  30. self:InitGenerate__1(Root,data)
  31. self:InitGenerate__2(Root,data)
  32. self:InitGenerate__3(Root,data)
  33. self:InitGenerate__4(Root,data)
  34. self:InitGenerate__5(Root,data)
  35. self:InitGenerate__6(Root,data)
  36. end
  37. ---@private
  38. function GotCoinItemView:InitGenerate__1(Root, data)
  39. --[[
  40. Root
  41. --]]
  42. end
  43. ---@private
  44. function GotCoinItemView:InitGenerate__2(Root, data)
  45. --[[
  46. icon
  47. --]]
  48. local tmp = Root:Find("icon").gameObject
  49. if tolua.getpeer(tmp) == nil then
  50. tolua.setpeer(tmp, {})
  51. end
  52. self.icon = tmp
  53. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  54. end
  55. ---@private
  56. function GotCoinItemView:InitGenerate__3(Root, data)
  57. --[[
  58. baseParCtr
  59. --]]
  60. local tmp = Root:Find("baseParCtr").gameObject
  61. if tolua.getpeer(tmp) == nil then
  62. tolua.setpeer(tmp, {})
  63. end
  64. self.baseParCtr = tmp
  65. tmp.uIParticle = tmp:GetComponent(Enum.TypeInfo.UIParticle)
  66. end
  67. ---@private
  68. function GotCoinItemView:InitGenerate__4(Root, data)
  69. --[[
  70. jobParCtr
  71. --]]
  72. local tmp = Root:Find("jobParCtr").gameObject
  73. if tolua.getpeer(tmp) == nil then
  74. tolua.setpeer(tmp, {})
  75. end
  76. self.jobParCtr = tmp
  77. tmp.uIParticle = tmp:GetComponent(Enum.TypeInfo.UIParticle)
  78. end
  79. ---@private
  80. function GotCoinItemView:InitGenerate__5(Root, data)
  81. --[[
  82. FX_UI_Baseexp
  83. --]]
  84. local tmp = Root:Find("FX_UI_Baseexp").gameObject
  85. if tolua.getpeer(tmp) == nil then
  86. tolua.setpeer(tmp, {})
  87. end
  88. self.basePar = tmp
  89. end
  90. ---@private
  91. function GotCoinItemView:InitGenerate__6(Root, data)
  92. --[[
  93. FX_UI_Jobexp
  94. --]]
  95. local tmp = Root:Find("FX_UI_Jobexp").gameObject
  96. if tolua.getpeer(tmp) == nil then
  97. tolua.setpeer(tmp, {})
  98. end
  99. self.jobPar = tmp
  100. end
  101. ---@private
  102. function GotCoinItemView:GenerateDestroy()
  103. if tolua.getpeer(self.icon) ~= nil then
  104. tolua.setpeer(self.icon, nil)
  105. end
  106. self.icon = nil
  107. if tolua.getpeer(self.baseParCtr) ~= nil then
  108. tolua.setpeer(self.baseParCtr, nil)
  109. end
  110. self.baseParCtr = nil
  111. if tolua.getpeer(self.jobParCtr) ~= nil then
  112. tolua.setpeer(self.jobParCtr, nil)
  113. end
  114. self.jobParCtr = nil
  115. if tolua.getpeer(self.basePar) ~= nil then
  116. tolua.setpeer(self.basePar, nil)
  117. end
  118. self.basePar = nil
  119. if tolua.getpeer(self.jobPar) ~= nil then
  120. tolua.setpeer(self.jobPar, nil)
  121. end
  122. self.jobPar = nil
  123. self.transform = nil
  124. self.gameObject = nil
  125. self.inited = false
  126. end
  127. return GotCoinItemView