Skip to main content

get 从映射表中获取对象

get

类型: MethodDeclaration

所属类: EntityManager

定义位置: scene.ts

描述

从映射表中获取对象

参数 key: 实体ID/预设ID/名称

返回值:返回实体对象

参数

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

返回值

类型: EntityObject \| undefined

返回实体对象

源代码

位置: 第 6555 行

public get(key: string): EntityObject | undefined {
return this.presetIdMap[key] ?? this.nameMap[key] ?? this.entityIdMap[key]
}

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