public interface EntityFactory
Entity within
the entire tree.DefaultEntityContainer,
DefaultEntityFactory| Modifier and Type | Method and Description |
|---|---|
void |
exportEntity(Entity e)
Exports an entity (removing all references).
|
Entity |
newEntity(java.util.UUID id,
EntityContainer target)
Creates a new entity with the specified ID and parent container.
|
void |
setEngine(ActionEngine engine)
Sets the engine to supply to new entities.
|
boolean |
tryImportEntity(Entity e,
EntityContainer target)
Imports the entity into the factory.
|
boolean |
tryKillEntity(Entity e)
Kills the specified entity.
|
boolean |
tryTakeFromTree(Entity e,
EntityContainer target)
Tries to take the entity from within the tree if possible.
|
boolean |
withinSameTree(EntityContainer source,
EntityContainer target)
Checks if the two containers are within the same tree (for in tree transfer or export).
|
void exportEntity(Entity e)
e - Entity to detach.Entity newEntity(java.util.UUID id, EntityContainer target)
id - Entity ID.target - Parent container.void setEngine(ActionEngine engine)
engine - Action engine.boolean tryImportEntity(Entity e, EntityContainer target)
e - Entity to import.target - Target container.boolean tryKillEntity(Entity e)
e - Entity to kill.boolean tryTakeFromTree(Entity e, EntityContainer target)
e - Entity to take.target - Target container.boolean withinSameTree(EntityContainer source, EntityContainer target)
source - Source container.target - Target container.