| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- import BuglySDK from "../sdk/BuglySDK";
- import FileUtil from "../utils/FileUtil";
- import TimeUtil from "../utils/TimeUtil";
- import AudioSystem from "./AudioSystem";
- import DataSystem from "./DataSystem";
- import HttpSystem from "./HttpSystem";
- import LoadResUtil from "../utils/LoadResUtil";
- import LogUtil from "../utils/LogUtil";
- import { EncryptUtil } from "../utils/EncryptUtil";
- import GameUtil from "../utils/GameUtil";
- import UISystem from "./UISystem";
- import StorageUtil from "../utils/StorageUtil";
- import TimerSystem from "./TimerSystem";
- import EventSystem from "./EventSystem";
- import MathUtil from "../utils/MathUtil";
- import AdSystem from "./AdSystem";
- import JsbSystem from "./JsbSystem";
- import ATSDKMgr from "../sdk/ad/toppon/AnyThinkAdsMgr/ATSDKMgr";
- /**
- * @description mk系统
- * @author 邹勇,冯聪,薛鸿潇,kaka
- */
- class MKSystem {
- constructor() {
- this.init();
- }
- /** 工具 */
- time: TimeUtil;
- file: FileUtil;
- encrypt: EncryptUtil;
- console: LogUtil;
- game: GameUtil;
- loader: LoadResUtil;
- storage: StorageUtil;
- math: MathUtil;
- /** SDK */
- bugly: BuglySDK;
- /** 系统管理 */
- data: DataSystem;
- ad: AdSystem;
- jsb: JsbSystem;
- http: HttpSystem;
- audio: AudioSystem;
- timer: TimerSystem;
- event: EventSystem;
- /** 挂载在MainScene的界面上,不需要new */
- ui: UISystem;
- init() {
- //工具
- this.time = new TimeUtil();
- this.file = new FileUtil();
- this.encrypt = new EncryptUtil();
- this.console = new LogUtil();
- this.game = new GameUtil();
- this.loader = new LoadResUtil();
- this.storage = new StorageUtil();
- this.math = new MathUtil();
- //sdk
- this.bugly = new BuglySDK();
- //system
- this.data = new DataSystem();
- this.http = new HttpSystem();
- this.audio = new AudioSystem();
- this.ad = new AdSystem(ATSDKMgr.getInstance());
- this.jsb = new JsbSystem();
- this.timer = new TimerSystem();
- this.event = new EventSystem();
- }
- }
- declare global {
- const mk: MKSystem;
- }
- window['mk'] = new MKSystem();
|