跳到主要内容

delete 删除冷却项目

delete

类型: MethodDeclaration

所属类: CooldownManager

定义位置: actor.ts

描述

删除冷却项目

参数 key: 冷却键

参数

参数名类型描述默认值
keystring--

返回值

类型: void

源代码

位置: 第 4936 行

private delete(key: string): void {
const item = this.keyMap[key]
if (item) {
delete this.keyMap[key]
this.cooldownList.remove(item)
// 如果列表为空,延迟将本列表从角色的更新器列表中移除
if (this.cooldownList.length === 0) {
Callback.push(() => {
this.actor.updaters.remove(this)
})
}
}
}

文档生成时间:2025/7/7 12:07:06