PCSkillInfoMgr.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ---@class PCSkillInfoMgr
  2. ---@field nowKeyId number @当前鼠标悬停的技能id
  3. ---@field mainUIShow boolean @主界面UI是否已加载完毕
  4. PCSkillInfoMgr = class()
  5. local this = PCSkillInfoMgr
  6. function this.Init()
  7. this.mainUIShow=false
  8. this.nowKeyId=0
  9. this.RegistEvents()
  10. end
  11. function this.RegistEvents()
  12. if not this.eventContainer then
  13. this.eventContainer = SL.eventContainer--EventContainer(EventManager)
  14. this.eventContainer:Regist(LOADING_PANEL_HIDE,this.LoadingPanelHide)
  15. SL:RegisterLUAEvent(LUA_EVENT_ROLE_LOGIN,this.LUA_EVENT_ROLE_LOGIN)
  16. SL:RegisterLUAEvent(LUA_EVENT_ROLE_LOGOUT,this.LUA_EVENT_ROLE_LOGOUT)
  17. end
  18. end
  19. ---加载界面关闭后才接收快捷键输入
  20. function this.LoadingPanelHide()
  21. ---需要再判断是否已经进入游戏
  22. if SL:GetIsInGame() then --LoginManager.InGame then
  23. this.mainUIShow=true
  24. end
  25. end
  26. ---进入角色后初始化一下pc端临时数据
  27. function this.LUA_EVENT_ROLE_LOGIN()
  28. this.nowKeyId=0
  29. end
  30. ---退出角色后初始化数据
  31. function this.LUA_EVENT_ROLE_LOGOUT()
  32. this.mainUIShow=false
  33. this.nowKeyId=0
  34. end