MKSystem.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import BuglySDK from "../sdk/BuglySDK";
  2. import FileUtil from "../utils/FileUtil";
  3. import TimeUtil from "../utils/TimeUtil";
  4. import AudioSystem from "./AudioSystem";
  5. import DataSystem from "./DataSystem";
  6. import HttpSystem from "./HttpSystem";
  7. import LoaderSystem from "../utils/LoadResUtil";
  8. import LogUtil from "../utils/LogUtil";
  9. import LoadResUtil from "../utils/LoadResUtil";
  10. class MKSystem {
  11. constructor() {
  12. this.init();
  13. }
  14. /** 工具 */
  15. time: TimeUtil;
  16. file: FileUtil;
  17. log:LogUtil;
  18. loadRes:LoadResUtil;
  19. /** SDK */
  20. bugly:BuglySDK;
  21. /** 系统管理 */
  22. loader: LoaderSystem;
  23. data:DataSystem;
  24. http:HttpSystem;
  25. audio:AudioSystem;
  26. init() {
  27. //工具
  28. this.time = new TimeUtil();
  29. this.file = new FileUtil();
  30. this.log = new LogUtil();
  31. this.loadRes = new LoadResUtil();
  32. //sdk
  33. this.bugly = new BuglySDK();
  34. //system
  35. this.loader = new LoaderSystem();
  36. this.audio = new AudioSystem();
  37. this.data = new DataSystem();
  38. this.http = new HttpSystem();
  39. }
  40. }
  41. declare global {
  42. const mk: MKSystem;
  43. }
  44. window['mk'] = new MKSystem();