EventCenter.ts
1.01 KB
import { Emitter } from "./EventKit";
export namespace EventCenter {
let emitter = new Emitter();
/**发起从oss上获取游戏中心配置数据的请求 */
export const REQUEST_COOPERATION_DATA_FROM_OSS = emitter.createEvent<(release: boolean) => void>();
/**游戏中心配置数据下载成功 */
export const COOPERATION_DATA_DOWNLOAD_SUCCEED = emitter.createEvent<() => void>();
/**快速开始子游戏 */
export const QUICK_START_SUB_GAME = emitter.createEvent<(random: boolean) => void>();
/**控制游戏中心列表是否展示 */
export const SHOW_GAME_CENTER_LIST_VIEW = emitter.createEvent<(show: boolean) => void>();
/**刷新子游戏列表 */
export const REFRESH_SUB_GAME_LIST = emitter.createEvent<() => void>();
/**根据子游戏ID打开指定小游戏 */
export const OPEN_SUBGAME_BY_APPID = emitter.createEvent<(appId: string) => void>();
/**检查热更后游戏初始化事件 */
export const GameStart = emitter.createEvent<() => void>();
}