clearGlobalActors 清除所有全局角色
clearGlobalActors
类型: MethodDeclaration
定义位置: actor.ts
描述
清除所有全局角色
返回值
类型: void
源代码
位置: 第 289 行
public clearGlobalActors(): void {
this.idMap = {}
// 遍历所有全局角色
for (const actor of this.list) {
// 从所有场景角色列表中移除该角色
for (const context of Scene.contexts) {
context?.actor.remove(actor)
}
actor.destroy()
}
this.list = []
}
文档生成时间:2025/7/7 12:07:06