Header menu logo Nu

WorldModuleEntity Module

Entity functions for the world (1/2).

Type extensions

Type extension Description

World.changeEntityDispatcher dispatcherName entity world

Full Usage: World.changeEntityDispatcher dispatcherName entity world

Parameters:
    dispatcherName : string
    entity : Entity
    world : World

Change the dispatcher of the given entity.

Extended Type: World

dispatcherName : string
entity : Entity
world : World

World.createEntity overlayDescriptor surnamesOpt group world

Full Usage: World.createEntity overlayDescriptor surnamesOpt group world

Parameters:
Returns: Entity

Create an entity and add it to the world.

Extended Type: World

overlayDescriptor : OverlayNameDescriptor
surnamesOpt : string array option
group : Group
world : World
Returns: Entity

World.createEntity4 overlayDescriptor descriptor group world

Full Usage: World.createEntity4 overlayDescriptor descriptor group world

Parameters:
Returns: Entity

Create an entity from a simulant descriptor.

Extended Type: World

overlayDescriptor : OverlayNameDescriptor
descriptor : SimulantDescriptor
group : Group
world : World
Returns: Entity

World.createEntity6 skipProcessing dispatcherName overlayDescriptor surnames group world

Full Usage: World.createEntity6 skipProcessing dispatcherName overlayDescriptor surnames group world

Parameters:
Returns: Entity

Create an entity and add it to the world.

Extended Type: World

skipProcessing : bool
dispatcherName : string
overlayDescriptor : OverlayNameDescriptor
surnames : string array option
group : Group
world : World
Returns: Entity

World.destroyEntityImmediate entity world

Full Usage: World.destroyEntityImmediate entity world

Parameters:

Destroy an entity in the world immediately. Can be dangerous if existing in-flight publishing depends on the entity's existence. Consider using World.destroyEntity instead.

Extended Type: World

entity : Entity
world : World

World.getEntityAllowedToMount entity world

Full Usage: World.getEntityAllowedToMount entity world

Parameters:
Returns: bool

Check that an entity should be allowed to mount another entity.

Extended Type: World

entity : Entity
world : World
Returns: bool

World.getEntityAncestors entity world

Full Usage: World.getEntityAncestors entity world

Parameters:
Returns: Entity seq

Get all of the entities parenting an entity.

Extended Type: World

entity : Entity
world : World
Returns: Entity seq

World.getEntityChildren entity world

Full Usage: World.getEntityChildren entity world

Parameters:
Returns: Entity seq

Get all of the entities directly parented by an entity.

Extended Type: World

entity : Entity
world : World
Returns: Entity seq

World.getEntityDescendants entity world

Full Usage: World.getEntityDescendants entity world

Parameters:
Returns: Entity seq

Get all of the entities descending from an entity.

Extended Type: World

entity : Entity
world : World
Returns: Entity seq

World.getEntityFacetNamesReflectively entityState

Full Usage: World.getEntityFacetNamesReflectively entityState

Parameters:
Returns: Set<string>

Get an entity's facet names via reflection.

Extended Type: World

entityState : EntityState
Returns: Set<string>

World.getEntityHasChildren entity world

Full Usage: World.getEntityHasChildren entity world

Parameters:
Returns: bool

Check that an entity has any children.

Extended Type: World

entity : Entity
world : World
Returns: bool

World.getEntityHasMounters entity world

Full Usage: World.getEntityHasMounters entity world

Parameters:
Returns: bool

Check that an entity has any other entities mounted on it.

Extended Type: World

entity : Entity
world : World
Returns: bool

World.getEntityIntrinsicFacetNames entityState

Full Usage: World.getEntityIntrinsicFacetNames entityState

Parameters:
Returns: Set<string>

Get an entity's intrinsic facet names.

Extended Type: World

entityState : EntityState
Returns: Set<string>

World.getEntityMounters entity world

Full Usage: World.getEntityMounters entity world

Parameters:
Returns: Entity seq

Get all of the entities directly mounted on an entity.

Extended Type: World

entity : Entity
world : World
Returns: Entity seq

World.getPropagationSources world

Full Usage: World.getPropagationSources world

Parameters:
Returns: Entity array

Extended Type: World

world : World
Returns: Entity array

World.getPropagationTargets entity world

Full Usage: World.getPropagationTargets entity world

Parameters:
Returns: Entity seq

Find all the entities to which an entity may propagate its structure.

Extended Type: World

entity : Entity
world : World
Returns: Entity seq

World.hasPropagationTargets entity world

Full Usage: World.hasPropagationTargets entity world

Parameters:
Returns: bool

Check that entity has entities to propagate its structure to.

Extended Type: World

entity : Entity
world : World
Returns: bool

World.notifyEntityModelChange entity world

Full Usage: World.notifyEntityModelChange entity world

Parameters:

Notify the engine that an entity's MMCC model has changed in some automatically undetectable way (such as being mutated directly by user code).

Extended Type: World

entity : Entity
world : World

World.readEntities tryReadOrder tryReadPropagationHistory entityDescriptors parent world

Full Usage: World.readEntities tryReadOrder tryReadPropagationHistory entityDescriptors parent world

Parameters:
Returns: Entity list

Read multiple entities.

Extended Type: World

tryReadOrder : bool
tryReadPropagationHistory : bool
entityDescriptors : EntityDescriptor list
parent : Simulant
world : World
Returns: Entity list

World.readEntity tryReadOrder tryReadPropagationHistory entityDescriptor nameOpt parent world

Full Usage: World.readEntity tryReadOrder tryReadPropagationHistory entityDescriptor nameOpt parent world

Parameters:
    tryReadOrder : bool
    tryReadPropagationHistory : bool
    entityDescriptor : EntityDescriptor
    nameOpt : string option
    parent : Simulant
    world : World

Returns: Entity

Read an entity from an entity descriptor.

Extended Type: World

tryReadOrder : bool
tryReadPropagationHistory : bool
entityDescriptor : EntityDescriptor
nameOpt : string option
parent : Simulant
world : World
Returns: Entity

World.readEntityFromFile tryReadOrder tryReadPropagationHistory filePath nameOpt parent world

Full Usage: World.readEntityFromFile tryReadOrder tryReadPropagationHistory filePath nameOpt parent world

Parameters:
    tryReadOrder : bool
    tryReadPropagationHistory : bool
    filePath : string
    nameOpt : string option
    parent : Simulant
    world : World

Returns: Entity

Read an entity from a file.

Extended Type: World

tryReadOrder : bool
tryReadPropagationHistory : bool
filePath : string
nameOpt : string option
parent : Simulant
world : World
Returns: Entity

World.traverseEntityChildren effect entity world

Full Usage: World.traverseEntityChildren effect entity world

Parameters:
Returns: World

Traverse all of the entities directly parented by an entity.

Extended Type: World

effect : Entity -> Entity -> World -> World
entity : Entity
world : World
Returns: World

World.traverseEntityMounters effect entity world

Full Usage: World.traverseEntityMounters effect entity world

Parameters:

Traverse all of the entities directly mounted on an entity.

Extended Type: World

effect : Entity -> Entity -> World -> unit
entity : Entity
world : World

World.trySetEntityFacetNames facetNames entity world

Full Usage: World.trySetEntityFacetNames facetNames entity world

Parameters:
Returns: Either<string, unit>

Try to set the entity's facet names.

Extended Type: World

facetNames : Set<string>
entity : Entity
world : World
Returns: Either<string, unit>

World.trySetEntityOverlayNameOpt overlayNameOpt entity world

Full Usage: World.trySetEntityOverlayNameOpt overlayNameOpt entity world

Parameters:
    overlayNameOpt : string option
    entity : Entity
    world : World

Returns: Either<string, unit>

Try to set an entity's optional overlay name.

Extended Type: World

overlayNameOpt : string option
entity : Entity
world : World
Returns: Either<string, unit>

World.writeEntities writeOrder writePropagationHistory entities world

Full Usage: World.writeEntities writeOrder writePropagationHistory entities world

Parameters:
    writeOrder : bool
    writePropagationHistory : bool
    entities : Entity seq
    world : World

Returns: EntityDescriptor list

Write multiple entities to a group descriptor.

Extended Type: World

writeOrder : bool
writePropagationHistory : bool
entities : Entity seq
world : World
Returns: EntityDescriptor list

World.writeEntity writeOrder writePropagationHistory entityDescriptor entity world

Full Usage: World.writeEntity writeOrder writePropagationHistory entityDescriptor entity world

Parameters:
Returns: EntityDescriptor

Write an entity to an entity descriptor.

Extended Type: World

writeOrder : bool
writePropagationHistory : bool
entityDescriptor : EntityDescriptor
entity : Entity
world : World
Returns: EntityDescriptor

World.writeEntityToFile writeOrder writePropagationHistory filePath enity world

Full Usage: World.writeEntityToFile writeOrder writePropagationHistory filePath enity world

Parameters:
    writeOrder : bool
    writePropagationHistory : bool
    filePath : string
    enity : Entity
    world : World

Write an entity to a file.

Extended Type: World

writeOrder : bool
writePropagationHistory : bool
filePath : string
enity : Entity
world : World

Type something to start searching.