UIRoleStrengthCtr.lua 661 B

1234567891011121314151617181920212223242526272829303132
  1. local UIRoleStrengthCtr = class("UIRoleStrengthCtr", require("UICtrBase"))
  2. function UIRoleStrengthCtr:Init(view)
  3. self.view = view
  4. end
  5. function UIRoleStrengthCtr:SetData(data)
  6. self.asyncIdx = 0
  7. if data == nil then return end
  8. self.data = data
  9. end
  10. function UIRoleStrengthCtr:GetAsyncIdx()
  11. self.asyncIdx = self.asyncIdx + 1
  12. return self.asyncIdx
  13. end
  14. function UIRoleStrengthCtr:GetData()
  15. return self.data
  16. end
  17. function UIRoleStrengthCtr:SendStrengthReq(id)
  18. ManagerContainer.NetManager:SendMessage(ProtoMsgId.CS_HERO_STRENGTH_REQ, {hero_id = id})
  19. end
  20. function UIRoleStrengthCtr:OnDispose()
  21. self.data = nil
  22. self.view = nil
  23. end
  24. return UIRoleStrengthCtr