UIDojoBadgeUpView_Generate.lua 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. ---@class UIDojoBadgeUp__Generate_textName
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public text TMPro.TextMeshProUGUI
  4. ---@class UIDojoBadgeUp__Generate_icon
  5. ---@field public gameObject UnityEngine.GameObject
  6. ---@field public image UnityEngine.UI.Image
  7. ---@class UIDojoBadgeUp__Generate
  8. ---@field private gameObject UnityEngine.GameObject
  9. ---@field private transform UnityEngine.Transform
  10. ---@field private icon UIDojoBadgeUp__Generate_icon
  11. ---@field private textName UIDojoBadgeUp__Generate_textName
  12. local UIDojoBadgeUpView = class("UIDojoBadgeUpView", require("UIViewBase"))
  13. function UIDojoBadgeUpView:ctor()
  14. end
  15. ---@private
  16. function UIDojoBadgeUpView:SetActive(result)
  17. self.gameObject:SetActive(result)
  18. end
  19. ---@private
  20. function UIDojoBadgeUpView:InitGenerate(Root, data)
  21. self.transform = Root
  22. self.inited = true
  23. if self.super.Init then
  24. self.super.Init(self)
  25. end
  26. local tmp
  27. self:InitGenerate__1(Root,data)
  28. self:InitGenerate__2(Root,data)
  29. end
  30. ---@private
  31. function UIDojoBadgeUpView:InitGenerate__1(Root, data)
  32. --[[
  33. Window/Badge/Icon
  34. --]]
  35. local tmp = Root:Find("Window/Badge/Icon").gameObject
  36. if tolua.getpeer(tmp) == nil then
  37. tolua.setpeer(tmp, {})
  38. end
  39. self.icon = tmp
  40. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  41. end
  42. ---@private
  43. function UIDojoBadgeUpView:InitGenerate__2(Root, data)
  44. --[[
  45. Window/Badge/TextName
  46. --]]
  47. local tmp = Root:Find("Window/Badge/TextName").gameObject
  48. if tolua.getpeer(tmp) == nil then
  49. tolua.setpeer(tmp, {})
  50. end
  51. self.textName = tmp
  52. tmp.text = tmp:GetComponent(Enum.TypeInfo.TextMeshProUGUI)
  53. end
  54. ---@private
  55. function UIDojoBadgeUpView:GenerateDestroy()
  56. if tolua.getpeer(self.icon) ~= nil then
  57. tolua.setpeer(self.icon, nil)
  58. end
  59. self.icon = nil
  60. if tolua.getpeer(self.textName) ~= nil then
  61. tolua.setpeer(self.textName, nil)
  62. end
  63. self.textName = nil
  64. self.transform = nil
  65. self.gameObject = nil
  66. self.inited = false
  67. end
  68. return UIDojoBadgeUpView