// // 偷懒,直接用EventTarget // export default new cc.EventTarget(); export type EventHanlder = { target?: any } & ((...args: any[]) => void) export default class EventMng { static on(type: string, callBack: Function, target: any) { cc.game.on(type, callBack, target) } static emit(type: string, arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any) { cc.game.emit(type, arg1, arg2, arg3, arg4, arg5) } static off(type: string, callBack: Function, target: any): void { cc.game.off(type, callBack, target) } static clear(type: string): void { cc.game.off(type) } static clearAll(): void { cc.game.clear() } }