跳转到内容

EntityCommands

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

Defined in: ecs/commands.ts:100

One entity’s share of a CommandsInstance: chain insert/remove and let the queue apply them. Asking EntityCommands.id for a spawn’s entity materialises it early, because an id has to exist to be answered.

new EntityCommands(commands, entity, name?): EntityCommands

Defined in: ecs/commands.ts:108

CommandsInstance

number | null

string

EntityCommands

childOf(parent): this

Defined in: ecs/commands.ts:151

Attach this entity under parent. The engine keeps Parent and Children in step from here — inserting Parent yourself writes only one half of the link.

number

this


finalize(): void

Defined in: ecs/commands.ts:167

void


id(): number

Defined in: ecs/commands.ts:160

number


insert<T>(component, data?): this

Defined in: ecs/commands.ts:121

T extends object

AnyComponentDef

Partial<T>

this


remove(component): this

Defined in: ecs/commands.ts:139

AnyComponentDef

this