Function addSyncTransport
add Sync Transport( engine: IEngine , sendBinary: ( ( msg: SendBinaryRequest ) => Promise < SendBinaryResponse > ) , getUserData: ( ( value: GetUserDataRequest ) => Promise < GetUserDataResponse > ) ) : { getChildren: ( ( parent: Entity ) => Iterable < Entity > ) ; getFirstChild: ( ( entity: Entity ) => Entity ) ; getParent: ( ( child: Entity ) => Entity | undefined ) ; isStateSyncronized: ( ( ) => boolean ) ; myProfile: IProfile ; parentEntity: ( ( entity: Entity , parent: Entity ) => void ) ; removeParent: ( ( entity: Entity ) => void ) ; syncEntity: ( ( entityId: Entity , componentIds: number [] , entityEnumId?: number ) => void ) ; }
Returns { getChildren: ( ( parent: Entity ) => Iterable < Entity > ) ; getFirstChild: ( ( entity: Entity ) => Entity ) ; getParent: ( ( child: Entity ) => Entity | undefined ) ; isStateSyncronized: ( ( ) => boolean ) ; myProfile: IProfile ; parentEntity: ( ( entity: Entity , parent: Entity ) => void ) ; removeParent: ( ( entity: Entity ) => void ) ; syncEntity: ( ( entityId: Entity , componentIds: number [] , entityEnumId?: number ) => void ) ; }
get Children: ( ( parent: Entity ) => Iterable < Entity > )
get First Child: ( ( entity: Entity ) => Entity )
get Parent: ( ( child: Entity ) => Entity | undefined )
is State Syncronized: ( ( ) => boolean )
( ) : boolean
Returns boolean
parent Entity: ( ( entity: Entity , parent: Entity ) => void )
remove Parent: ( ( entity: Entity ) => void )
( entity: Entity ) : void
Returns void
sync Entity: ( ( entityId: Entity , componentIds: number [] , entityEnumId?: number ) => void )
( entityId: Entity , componentIds: number [] , entityEnumId?: number ) : void
Parameters
componentIds: number []
Optional
entityEnumId: number
Returns void
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))