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

Method updateLists

packages/core/src/ECS/Utils/EntityList.ts:123–139  ·  view source on GitHub ↗

* 更新实体列表,处理延迟操作

()

Source from the content-addressed store, hash-verified

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 * 更新实体列表

Callers 2

updateMethod · 0.95
updateMethod · 0.45

Calls 2

addImmediateMethod · 0.95
removeImmediateMethod · 0.95

Tested by

no test coverage detected