Function addSyncTransport
addSyncTransport( 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 ) ; }
getChildren: ( ( parent: Entity ) => Iterable < Entity > )
getFirstChild: ( ( entity: Entity ) => Entity )
getParent: ( ( child: Entity ) => Entity | undefined )
isStateSyncronized: ( ( ) => boolean )
( ) : boolean
Returns boolean
parentEntity: ( ( entity: Entity , parent: Entity ) => void )
removeParent: ( ( entity: Entity ) => void )
( entity: Entity ) : void
Returns void
syncEntity: ( ( 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))