* 获取系统处理的实体列表
()
| 152 | * 获取系统处理的实体列表 |
| 153 | */ |
| 154 | public get entities(): readonly Entity[] { |
| 155 | // 如果在update周期内,优先使用帧缓存 |
| 156 | const frameCache = this._entityCache.getFrame(); |
| 157 | if (frameCache !== null) { |
| 158 | return frameCache; |
| 159 | } |
| 160 | |
| 161 | // 否则使用持久缓存 |
| 162 | if (!this._entityCache.hasPersistent()) { |
| 163 | this._entityCache.setPersistent(this.queryEntities()); |
| 164 | } |
| 165 | |
| 166 | return this._entityCache.getPersistent()!; |
| 167 | } |
| 168 | |
| 169 | /** |
| 170 | * 获取系统的更新时序 |
nothing calls this directly
no test coverage detected