public final class EntityTransmuter extends Object
Given a set of component additions/removals: for each encountered
compositionId, cache the calculated new compositionId. This extends
the performance benefits introduced with
Archetypes
in 0.7.0 to carry over to existing entities.
EntityTransmuterFactory
Constructor and Description |
---|
EntityTransmuter(World world,
Aspect.Builder aspect) |
Modifier and Type | Method and Description |
---|---|
String |
toString() |
void |
transmute(Entity e)
Apply on target entity.
|
void |
transmute(int entityId)
Apply on target entity.
|
public EntityTransmuter(World world, Aspect.Builder aspect)
public void transmute(int entityId)
Apply on target entity. Does nothing if entity has been scheduled for deletion.
Transmuter will add components by replacing and retire pre-existing components.
entityId
- target entity idpublic void transmute(Entity e)
e
- target entity.Copyright © 2019. All rights reserved.