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

Method spawn

packages/particle/src/Particle.ts:182–191  ·  view source on GitHub ↗

* 获取一个空闲粒子 * Get an inactive particle

()

Source from the content-addressed store, hash-verified

180 * Get an inactive particle
181 */
182 spawn(): Particle | null {
183 for (const p of this._particles) {
184 if (!p.alive) {
185 p.alive = true;
186 this._activeCount++;
187 return p;
188 }
189 }
190 return null;
191 }
192
193 /**
194 * 回收粒子

Callers 6

emitMethod · 0.45
burstMethod · 0.45
open_folderFunction · 0.45
show_in_folderFunction · 0.45
open_with_editorFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected