| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- 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";
- import TweenUtil from "../utils/TweenUtil";
- import FlySystem from "./FlySystem";
- import GuideSystem from "./GuideSystem";
- import StringUtil from "../utils/StringUtil";
- import SetGray from "../../game/component/SetGray";
- import NumberAnim from "../../game/component/NumberAnim";
- import AliRiskManager from "../sdk/aliRisk/AliRiskManager";
- import ShuzilmM from "../sdk/shuzilm/ShuzilmM";
- import TongdunM from "../sdk/tongdun/TongdunM";
- /**
- * @description mk系统
- * @author 邹勇,冯聪,薛鸿潇,kaka
- */
- class MKSystem {
- constructor() {
- }
- /** 工具 */
- private _time: TimeUtil;
- public get time(): TimeUtil {
- return this._time || (this._time = new TimeUtil());
- }
- private _file: FileUtil;
- public get file(): FileUtil {
- return this._file || (this._file = new FileUtil());
- }
- private _encrypt: EncryptUtil;
- public get encrypt(): EncryptUtil {
- return this._encrypt || (this._encrypt = new EncryptUtil());
- }
- private _console: LogUtil;
- public get console(): LogUtil {
- return this._console || (this._console = new LogUtil());
- }
- private _game: GameUtil;
- public get game(): GameUtil {
- return this._game || (this._game = new GameUtil());
- }
- private _loader: LoadResUtil;
- public get loader(): LoadResUtil {
- return this._loader || (this._loader = new LoadResUtil());
- }
- private _storage: StorageUtil;
- public get storage(): StorageUtil {
- return this._storage || (this._storage = new StorageUtil());
- }
- private _math: MathUtil;
- public get math(): MathUtil {
- return this._math || (this._math = new MathUtil());
- }
- private _string: StringUtil;
- public get string(): StringUtil {
- return this._string || (this._string = new StringUtil());
- }
- private _tween: TweenUtil;
- public get tween(): TweenUtil {
- return this._tween || (this._tween = new TweenUtil())
- }
- /** SDK */
- private _bugly: BuglySDK;
- public get bugly(): BuglySDK {
- return this._bugly || (this._bugly = new BuglySDK());
- }
- /** 系统管理 */
- private _data: DataSystem;
- public get data(): DataSystem {
- return this._data || (this._data = new DataSystem());
- }
- private _ad: AdSystem;
- public get ad(): AdSystem {
- return this._ad || (this._ad = new AdSystem(ATSDKMgr.getInstance()));
- }
- private _jsb: JsbSystem;
- public get jsb(): JsbSystem {
- return this._jsb || (this._jsb = new JsbSystem());
- }
- private _http: HttpSystem;
- public get http(): HttpSystem {
- return this._http || (this._http = new HttpSystem());
- }
- private _audio: AudioSystem;
- public get audio(): AudioSystem {
- return this._audio || (this._audio = new AudioSystem());
- }
- private _timer: TimerSystem;
- public get timer(): TimerSystem {
- return this._timer || (this._timer = new TimerSystem());
- }
- private _event: EventSystem;
- public get event(): EventSystem {
- return this._event || (this._event = new EventSystem());
- }
- private _pool: PoolSystem;
- public get pool(): PoolSystem {
- return this._pool || (this._pool = new PoolSystem());
- }
- private _guide: GuideSystem;
- public get guide(): GuideSystem {
- return this._guide || (this._guide = new GuideSystem());
- }
- private _aliRiskManager: AliRiskManager;
- public get aliRiskManager(): AliRiskManager {
- return this._aliRiskManager || (this._aliRiskManager = new AliRiskManager());
- }
- //数盟
- private _shuzilmM: ShuzilmM;
- public get shuzilmM(): ShuzilmM {
- return this._shuzilmM || (this._shuzilmM = new ShuzilmM())
- }
- //同盾
- private _tongdunM: TongdunM;
- public get tongdunM(): TongdunM {
- return this._tongdunM || (this._tongdunM = new TongdunM())
- }
- /** 挂载在MainScene的界面上,不需要new */
- private _ui: UISystem;
- public get ui(): UISystem {
- return this._ui;
- }
- public set ui(v: UISystem) {
- this._ui = v;
- }
- private _tip: TipSystem;
- public get tip(): TipSystem {
- return this._tip;
- }
- public set tip(v: TipSystem) {
- this._tip = v;
- }
- private _fly: FlySystem;
- public get fly(): FlySystem {
- return this._fly;
- }
- public set fly(v: FlySystem) {
- this._fly = v;
- }
- /** mk组件类型,此处仅返回类型 */
- private _component: comp_type
- /** 组件类型 */
- public get component(): comp_type {
- return this._component || (this._component = new comp_type());
- }
- }
- /**
- * 组件类型
- */
- class comp_type {
- /** 置灰组件 */
- get setGray() {
- return SetGray;
- }
- /** 置灰组件 */
- get numberAnim() {
- return NumberAnim;
- }
- }
- declare global {
- /** 牛逼的梦嘉引擎 */
- const mk: MKSystem;
- }
- window['mk'] = new MKSystem();
|