* 获取或创建组件的EntityRef值存储Map
(component: Component)
| 26 | * 获取或创建组件的EntityRef值存储Map |
| 27 | */ |
| 28 | function 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引用装饰器 |