• Parameters

    Returns {
        getChildren: ((parent: Entity) => Iterable<Entity>);
        getFirstChild: ((entity: Entity) => Entity);
        getParent: ((child: Entity) => Entity | undefined);
        parentEntity: ((entity: Entity, parent: Entity) => void);
        removeParent: ((entity: Entity) => void);
        syncEntity: ((entityId: Entity, componentIds: number[], entityEnumId?: number) => void);
    }

    • getChildren: ((parent: Entity) => Iterable<Entity>)
        • (parent: Entity): Iterable<Entity>
        • Returns an iterable of all the childrens of the given entity. for (const children of getChildren(parent)) { console.log(children) } or just => const childrens: Entity[] = Array.from(getChildren(parent))

          Parameters

          Returns Iterable<Entity>

    • getFirstChild: ((entity: Entity) => Entity)
    • getParent: ((child: Entity) => Entity | undefined)
        • (child: Entity): Entity | undefined
        • Returns the parent entity of the given entity.

          Parameters

          Returns Entity | undefined

    • parentEntity: ((entity: Entity, parent: Entity) => void)
        • (entity: Entity, parent: Entity): void
        • Adds the network parenting to sync entities. Equivalent to Transform.parent for local entities

          Parameters

          Returns void

    • removeParent: ((entity: Entity) => void)
        • (entity: Entity): void
        • Removes the network parenting from an entity

          Parameters

          Returns void

    • syncEntity: ((entityId: Entity, componentIds: number[], entityEnumId?: number) => void)
        • (entityId: Entity, componentIds: number[], entityEnumId?: number): void
        • Create a network entity (sync) through comms, and sync the received components

          Parameters

          • entityId: Entity
          • componentIds: number[]
          • Optional entityEnumId: number

          Returns void