* 更新实体列表,处理延迟操作
()
| 121 | * 更新实体列表,处理延迟操作 |
| 122 | */ |
| 123 | public updateLists(): void { |
| 124 | // 处理延迟添加的实体 |
| 125 | if (this._entitiesToAdd.length > 0) { |
| 126 | for (const entity of this._entitiesToAdd) { |
| 127 | this.addImmediate(entity); |
| 128 | } |
| 129 | this._entitiesToAdd.length = 0; |
| 130 | } |
| 131 | |
| 132 | // 处理延迟移除的实体 |
| 133 | if (this._entitiesToRemove.length > 0) { |
| 134 | for (const entity of this._entitiesToRemove) { |
| 135 | this.removeImmediate(entity); |
| 136 | } |
| 137 | this._entitiesToRemove.length = 0; |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | /** |
| 142 | * 更新实体列表 |
no test coverage detected