public abstract class PackedComponent extends Component
ByteBuffer,
reuses the same instance for all entities.
Constructor must either be zero-length or take a World instance.
Calling the constructor must not change the underlying component data - ie,
it's the equivalent of a Object.clone().
| Modifier and Type | Class and Description |
|---|---|
static interface |
PackedComponent.DisposedWithWorld
Marks packed component for freeing of resources upon
World.dispose(). |
| Constructor and Description |
|---|
PackedComponent() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
ensureCapacity(int id)
Internal method, used by the
ComponentManager,
will always send the highest seen Entity.getId(). |
protected abstract void |
forEntity(Entity e)
Sets the currently processed entity.
|
protected abstract void |
reset()
Resets the component upon deletion.
|
protected abstract void forEntity(Entity e)
PackedComponentMapper.e - Entity to process.protected abstract void ensureCapacity(int id)
ComponentManager,
will always send the highest seen Entity.getId().
Ensures that the backing data storage can accomodate
all entities.id - Highest seen entity id.protected abstract void reset()
Copyright © 2014. All Rights Reserved.