跳转到内容

CommandsInstance

此内容尚不支持你的语言。

Defined in: ecs/commands.ts:187

The command queue a system declared with Commands. Records structural work — spawn, despawn, add or remove a component, install a resource — and applies it when the system returns, so nothing moves under a running query.

new CommandsInstance(world, resources): CommandsInstance

Defined in: ecs/commands.ts:193

World

ResourceStorage

CommandsInstance

despawn(entity): this

Defined in: ecs/commands.ts:208

number

this


entity(entity): EntityCommands

Defined in: ecs/commands.ts:204

number

EntityCommands


flush(): void

Defined in: ecs/commands.ts:254

void


insertResource<T>(resource, value): this

Defined in: ecs/commands.ts:213

T

ResourceDef<T>

T

this


queueInsert(entity, component, data): void

Defined in: ecs/commands.ts:222

number

AnyComponentDef

unknown

void


queueRemove(entity, component): void

Defined in: ecs/commands.ts:226

number

AnyComponentDef

void


queueSetParent(entity, parent): void

Defined in: ecs/commands.ts:230

number

number

void


spawn(name?): EntityCommands

Defined in: ecs/commands.ts:198

string

EntityCommands