Skip to content

i-entity overview


Table of contents


utils

IEntity (class)

Signature

export declare class IEntity<D, R, TypeDoc>

addChildren (method)

Signature

public addChildren(...entities: IEntity[])

removeChildren (method)

Signature

public removeChildren(entities: IEntity[], dispose: boolean = false)

getChildEntityByName (method)

Find a descendant entity by name, searching this entity's own children and their children recursively (depth-first) - not the whole world, just this entity's subtree. Useful e.g. to pull a specific entity back out of a GroupEntity a LevelLoader handed back: level.getChildEntityByName('KillFloor').

Signature

public getChildEntityByName<T extends IEntity = IEntity>(name: string): T

findChildEntityByName (method)

Signature

private findChildEntityByName(name: string): IEntity | undefined

addComponents (method)

Signature

public addComponents(...components: IWorldComponent<D, R, TypeDoc>[])

removeComponents (method)

Signature

public removeComponents(components: IWorldComponent<D, R, TypeDoc>[], dispose: boolean = false)

onSpawned (method)

Signature

public onSpawned(world: GgWorld<D, R, TypeDoc>)

onRemoved (method)

Signature

public onRemoved()

dispose (method)

Signature

public dispose(): void

tick$ (property)

will receive [elapsed time, delta] of each world clock tick

Signature

readonly tick$: any

tickOrder (property)

the priority of ticker: the less value, the earlier tick will be run.

Signature

readonly tickOrder: number

_world (property)

a world reference, where this entity was added to

Signature

_world: GgWorld<D, R, TypeDoc, GgWorldSceneTypeRepo<D, R, TypeDoc>> | null

_name (property)

Signature

_name: string

_selfActive (property)

The flag whether entity should listen to ticks. If set to false, ticks will not be propagated to this entity

Signature

_selfActive: boolean

parent (property)

Signature

parent: IEntity<any, any, GgWorldTypeDocRepo<any, any>> | null

_onSpawned$ (property)

Signature

_onSpawned$: any

_onRemoved$ (property)

Signature

_onRemoved$: any