GuideProxy.lua 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. local RemoteProxy = requireProxy("remote/RemoteProxy")
  2. local GuideProxy = class("GuideProxy", RemoteProxy)
  3. GuideProxy.NAME = global.ProxyTable.GuideProxy
  4. local ssplit = string.split
  5. function GuideProxy:ctor()
  6. GuideProxy.super.ctor(self)
  7. end
  8. function GuideProxy:RegisterMsgHandler()
  9. GuideProxy.super.RegisterMsgHandler(self)
  10. local msgType = global.MsgType
  11. LuaRegisterMsgHandler(global.MsgType.MSG_SC_GUIDE_TIPS, handler(self, self.handle_MSG_SC_GUIDE_TIPS))
  12. end
  13. function GuideProxy:handle_MSG_SC_GUIDE_TIPS(msg)
  14. local msgLen = msg:GetDataLength()
  15. if msgLen < 1 then return end
  16. local msgHdr = msg:GetHeader()
  17. local str = msg:GetData():ReadString(msgLen)
  18. local strs = string.split(str, ",")
  19. --主窗口ID 控件ID 描述
  20. local mainId = strs[1] or 0
  21. local uiId = strs[2] or 0
  22. local desc = strs[3] or ""
  23. global.Facade:sendNotification(global.NoticeTable.GuideStart, { mainId = mainId, uiId = uiId, desc = desc })
  24. end
  25. return GuideProxy