| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- import BuglySDK from "../sdk/BuglySDK";
- import FileUtil from "../utils/FileUtil";
- import TimeUtil from "../utils/TimeUtil";
- 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";
- import AudioSystem from "./AudioSystem";
- import TipSystem from "./TipSystem";
- import PoolSystem from "./PoolSystem";
- /**
- * @description mk系统
- * @author 邹勇,冯聪,薛鸿潇,kaka
- */
- class MKSystem {
- constructor() {
-
- }
- /** 工具 */
- _time: TimeUtil;
- public get time():TimeUtil{
- return this._time || new TimeUtil();
- }
- _file: FileUtil;
- public get file():FileUtil{
- return this._file || new FileUtil();
- }
- _encrypt: EncryptUtil;
- public get encrypt():EncryptUtil{
- return this._encrypt || new EncryptUtil();
- }
- _console: LogUtil;
- public get console():LogUtil{
- return this._console || new LogUtil();
- }
- _game: GameUtil;
- public get game():GameUtil{
- return this._game || new GameUtil();
- }
- _loader: LoadResUtil;
- public get loader():LoadResUtil{
- return this._loader || new LoadResUtil();
- }
- _storage: StorageUtil;
- public get storage():StorageUtil{
- return this._storage || new StorageUtil();
- }
- _math: MathUtil;
- public get math():MathUtil{
- return this._math || new MathUtil();
- }
- /** SDK */
- _bugly: BuglySDK;
- public get bugly():BuglySDK{
- return this._bugly || new BuglySDK();
- }
- /** 系统管理 */
- _data: DataSystem;
- public get data():DataSystem{
- return this._data || new DataSystem();
- }
- _ad: AdSystem;
- public get ad():AdSystem{
- return this._ad || new AdSystem(ATSDKMgr.getInstance());
- }
- _jsb: JsbSystem;
- public get jsb():JsbSystem{
- return this._jsb || new JsbSystem();
- }
- _http: HttpSystem;
- public get http():HttpSystem{
- return this._http || new HttpSystem();
- }
- _audio: AudioSystem;
- public get audio():AudioSystem{
- return this._audio || new AudioSystem();
- }
- _timer: TimerSystem;
- public get timer():TimerSystem{
- return this._timer || new TimerSystem();
- }
- _event: EventSystem;
- public get event():EventSystem{
- return this._event || new EventSystem();
- }
- _pool:PoolSystem;
- public get pool():PoolSystem{
- return this._pool || new PoolSystem();
- }
- /** 挂载在MainScene的界面上,不需要new */
- _ui: UISystem;
- public get ui():UISystem{
- return this._ui || new UISystem();
- }
- _tip:TipSystem;
- public get tip():TipSystem{
- return this._tip || new TipSystem();
- }
- }
- declare global {
- const mk: MKSystem;
- }
- window['mk'] = new MKSystem();
|