MCPcopy Create free account
hub / github.com/esengine/esengine / getValueMap

Function getValueMap

packages/core/src/ECS/Decorators/EntityRefDecorator.ts:28–35  ·  view source on GitHub ↗

* 获取或创建组件的EntityRef值存储Map

(component: Component)

Source from the content-addressed store, hash-verified

26 * 获取或创建组件的EntityRef值存储Map
27 */
28function getValueMap(component: Component): Map<string, Entity | null> {
29 let map = (component as any)[ENTITY_REF_VALUES];
30 if (!map) {
31 map = new Map<string, Entity | null>();
32 (component as any)[ENTITY_REF_VALUES] = map;
33 }
34 return map;
35}
36
37/**
38 * Entity引用装饰器

Callers 1

EntityRefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected