VipUnlockDesItem_Generate.lua 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. ---@class VipUnlockDesItem__Generate_desTxt
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text UnityEngine.UI.Text
  4. ---@class VipUnlockDesItem__Generate
  5. ---@field private gameObject UnityEngine.GameObject
  6. ---@field private transform UnityEngine.Transform
  7. ---@field private rectTransform UnityEngine.RectTransform
  8. ---@field private desTxt VipUnlockDesItem__Generate_desTxt
  9. ---@field private exist UnityEngine.GameObject
  10. ---@field private new UnityEngine.GameObject
  11. local VipUnlockDesItemView = class("VipUnlockDesItemView")
  12. function VipUnlockDesItemView:ctor()
  13. end
  14. ---@private
  15. function VipUnlockDesItemView:SetActive(result)
  16. self.gameObject:SetActive(result)
  17. end
  18. ---@private
  19. function VipUnlockDesItemView:InitGenerate(Root, data)
  20. self.transform = Root
  21. self.inited = true
  22. local tmp
  23. self:InitGenerate__1(Root,data)
  24. self:InitGenerate__2(Root,data)
  25. self:InitGenerate__3(Root,data)
  26. self:InitGenerate__4(Root,data)
  27. end
  28. ---@private
  29. function VipUnlockDesItemView:InitGenerate__1(Root, data)
  30. --[[
  31. Root
  32. --]]
  33. self.rectTransform = Root:GetComponent(Enum.TypeInfo.RectTransform)
  34. end
  35. ---@private
  36. function VipUnlockDesItemView:InitGenerate__2(Root, data)
  37. --[[
  38. DesTxt
  39. --]]
  40. local tmp = Root:Find("DesTxt").gameObject
  41. if tolua.getpeer(tmp) == nil then
  42. tolua.setpeer(tmp, {})
  43. end
  44. self.desTxt = tmp
  45. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  46. end
  47. ---@private
  48. function VipUnlockDesItemView:InitGenerate__3(Root, data)
  49. --[[
  50. DesTxt/Exist
  51. --]]
  52. local tmp = Root:Find("DesTxt/Exist").gameObject
  53. if tolua.getpeer(tmp) == nil then
  54. tolua.setpeer(tmp, {})
  55. end
  56. self.exist = tmp
  57. end
  58. ---@private
  59. function VipUnlockDesItemView:InitGenerate__4(Root, data)
  60. --[[
  61. DesTxt/New
  62. --]]
  63. local tmp = Root:Find("DesTxt/New").gameObject
  64. if tolua.getpeer(tmp) == nil then
  65. tolua.setpeer(tmp, {})
  66. end
  67. self.new = tmp
  68. end
  69. ---@private
  70. function VipUnlockDesItemView:GenerateDestroy()
  71. if tolua.getpeer(self.desTxt) ~= nil then
  72. tolua.setpeer(self.desTxt, nil)
  73. end
  74. self.desTxt = nil
  75. if tolua.getpeer(self.exist) ~= nil then
  76. tolua.setpeer(self.exist, nil)
  77. end
  78. self.exist = nil
  79. if tolua.getpeer(self.new) ~= nil then
  80. tolua.setpeer(self.new, nil)
  81. end
  82. self.new = nil
  83. self.transform = nil
  84. self.gameObject = nil
  85. self.inited = false
  86. end
  87. return VipUnlockDesItemView