API 参考main 模块emit 发送游戏事件On this pageemit 发送游戏事件emit 类型: MethodDeclaration 定义位置: main.ts 描述 发送游戏事件 参数 type: 游戏事件类型 参数 参数名类型描述默认值typeGameEventType-- 返回值 类型: void 源代码 位置: 第 194 行 public emit(type: GameEventType): void { for (const listener of this.listeners[type]) { listener() } } 文档生成时间:2025/7/7 12:07:06