PCPlatformMgr.lua 1014 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. require "dev/PCPlatform/CursorMgr"
  2. require "dev/PCPlatform/PCFastKey"
  3. require "dev/PCPlatform/PCSkillInfoMgr"
  4. ---@class PCPlatformMgr
  5. ---@field IsPCPlatform boolean
  6. PCPlatformMgr = class()
  7. local this = PCPlatformMgr
  8. this.ShowedShortcutKeyPanel = false
  9. function this.Init()
  10. this.CursorMgr = CursorMgr
  11. this.CursorMgr.Init()
  12. PCFastKey.Init()
  13. PCSkillInfoMgr.Init()
  14. end
  15. function this.Update()
  16. this.CursorMgr.Update()
  17. this.ShortCutKey()
  18. PCFastKey.Update()
  19. end
  20. function this.ShortCutKey()
  21. if not SL:GetIsInGame() then
  22. return
  23. end
  24. if (Input.GetKeyDown(KeyCode.F1)) then
  25. if this.ShowedShortcutKeyPanel then
  26. GUI:UIPanel_Close("dev/outui/PCPlatform/Panel/KLShortcurKeyExplain/KLShortcurKeyExplainPanel")
  27. this.ShowedShortcutKeyPanel = false
  28. else
  29. GUI:UIPanel_Open("dev/outui/PCPlatform/Panel/KLShortcurKeyExplain/KLShortcurKeyExplainPanel")
  30. this.ShowedShortcutKeyPanel = true
  31. end
  32. end
  33. end
  34. this.Init()