setEventMap 设置事件映射表
setEventMap
类型: MethodDeclaration
所属类: GlobalActor
定义位置: actor.ts
描述
设置事件映射表
参数
参数名 | 类型 | 描述 | 默认值 |
---|---|---|---|
map | HashMap<CommandFunctionList> | - | - |
返回值
类型: void
源代码
位置: 第 1372 行
public setEventMap(map: HashMap<CommandFunctionList>): void {
for (const updater of this.updaters) {
if (updater instanceof EventHandler &&
GlobalActor.localEventKey in updater as any) {
updater.finish()
}
}
const oldAutorun = this.registeredEvents.autorun ?? this.events.autorun
const newAutorun = this.registeredEvents.autorun ?? map.autorun
if (oldAutorun !== newAutorun) this.started = false
this.events = map
}
文档生成时间:2025/7/7 12:07:06