WjBattleBuffInfoItem_Generate.lua 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. ---@class WjBattleBuffInfoItem__Generate_descTxt
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class WjBattleBuffInfoItem__Generate_getBtn_number
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public text TMPro.TextMeshProUGUI
  7. ---@class WjBattleBuffInfoItem__Generate_getBtn
  8. ---@field public gameObject UnityEngine.GameObject
  9. ---@field public button UnityEngine.UI.Button
  10. ---@field public number WjBattleBuffInfoItem__Generate_getBtn_number
  11. ---@class WjBattleBuffInfoItem__Generate_itemIcon
  12. ---@field public gameObject UnityEngine.GameObject
  13. ---@field public image UnityEngine.UI.Image
  14. ---@class WjBattleBuffInfoItem__Generate_itemName
  15. ---@field public gameObject UnityEngine.GameObject
  16. ---@field public text UnityEngine.UI.Text
  17. ---@class WjBattleBuffInfoItem__Generate
  18. ---@field private gameObject UnityEngine.GameObject
  19. ---@field private transform UnityEngine.Transform
  20. ---@field private itemName WjBattleBuffInfoItem__Generate_itemName
  21. ---@field private itemIcon WjBattleBuffInfoItem__Generate_itemIcon
  22. ---@field private getBtn WjBattleBuffInfoItem__Generate_getBtn
  23. ---@field private sealBtn UnityEngine.GameObject
  24. ---@field private descTxt WjBattleBuffInfoItem__Generate_descTxt
  25. local WjBattleBuffInfoItemView = class("WjBattleBuffInfoItemView")
  26. function WjBattleBuffInfoItemView:ctor()
  27. end
  28. ---@private
  29. function WjBattleBuffInfoItemView:SetActive(result)
  30. self.gameObject:SetActive(result)
  31. end
  32. ---@private
  33. function WjBattleBuffInfoItemView:InitGenerate(Root, data)
  34. self.transform = Root
  35. self.inited = true
  36. local tmp
  37. self:InitGenerate__1(Root,data)
  38. self:InitGenerate__2(Root,data)
  39. self:InitGenerate__3(Root,data)
  40. self:InitGenerate__4(Root,data)
  41. self:InitGenerate__5(Root,data)
  42. self:InitGenerate__6(Root,data)
  43. self:InitGenerate__7(Root,data)
  44. end
  45. ---@private
  46. function WjBattleBuffInfoItemView:InitGenerate__1(Root, data)
  47. --[[
  48. Root
  49. --]]
  50. end
  51. ---@private
  52. function WjBattleBuffInfoItemView:InitGenerate__2(Root, data)
  53. --[[
  54. GoodsName/ItemName
  55. --]]
  56. local tmp = Root:Find("GoodsName/ItemName").gameObject
  57. if tolua.getpeer(tmp) == nil then
  58. tolua.setpeer(tmp, {})
  59. end
  60. self.itemName = tmp
  61. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  62. end
  63. ---@private
  64. function WjBattleBuffInfoItemView:InitGenerate__3(Root, data)
  65. --[[
  66. ItemIcon
  67. --]]
  68. local tmp = Root:Find("ItemIcon").gameObject
  69. if tolua.getpeer(tmp) == nil then
  70. tolua.setpeer(tmp, {})
  71. end
  72. self.itemIcon = tmp
  73. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  74. end
  75. ---@private
  76. function WjBattleBuffInfoItemView:InitGenerate__4(Root, data)
  77. --[[
  78. GetBtn
  79. --]]
  80. local tmp = Root:Find("GetBtn").gameObject
  81. if tolua.getpeer(tmp) == nil then
  82. tolua.setpeer(tmp, {})
  83. end
  84. self.getBtn = tmp
  85. tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
  86. end
  87. ---@private
  88. function WjBattleBuffInfoItemView:InitGenerate__5(Root, data)
  89. --[[
  90. GetBtn/Number
  91. --]]
  92. local tmp = Root:Find("GetBtn/Number").gameObject
  93. if tolua.getpeer(tmp) == nil then
  94. tolua.setpeer(tmp, {})
  95. end
  96. self.getBtn.number = tmp
  97. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  98. end
  99. ---@private
  100. function WjBattleBuffInfoItemView:InitGenerate__6(Root, data)
  101. --[[
  102. Seal
  103. --]]
  104. local tmp = Root:Find("Seal").gameObject
  105. if tolua.getpeer(tmp) == nil then
  106. tolua.setpeer(tmp, {})
  107. end
  108. self.sealBtn = tmp
  109. end
  110. ---@private
  111. function WjBattleBuffInfoItemView:InitGenerate__7(Root, data)
  112. --[[
  113. DescTxt
  114. --]]
  115. local tmp = Root:Find("DescTxt").gameObject
  116. if tolua.getpeer(tmp) == nil then
  117. tolua.setpeer(tmp, {})
  118. end
  119. self.descTxt = tmp
  120. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  121. end
  122. ---@private
  123. function WjBattleBuffInfoItemView:GenerateDestroy()
  124. if tolua.getpeer(self.getBtn.number) ~= nil then
  125. tolua.setpeer(self.getBtn.number, nil)
  126. end
  127. if tolua.getpeer(self.itemName) ~= nil then
  128. tolua.setpeer(self.itemName, nil)
  129. end
  130. self.itemName = nil
  131. if tolua.getpeer(self.itemIcon) ~= nil then
  132. tolua.setpeer(self.itemIcon, nil)
  133. end
  134. self.itemIcon = nil
  135. if tolua.getpeer(self.getBtn) ~= nil then
  136. tolua.setpeer(self.getBtn, nil)
  137. end
  138. self.getBtn = nil
  139. if tolua.getpeer(self.sealBtn) ~= nil then
  140. tolua.setpeer(self.sealBtn, nil)
  141. end
  142. self.sealBtn = nil
  143. if tolua.getpeer(self.descTxt) ~= nil then
  144. tolua.setpeer(self.descTxt, nil)
  145. end
  146. self.descTxt = nil
  147. self.transform = nil
  148. self.gameObject = nil
  149. self.inited = false
  150. end
  151. return WjBattleBuffInfoItemView