@SkipWire public class EntityManager extends BaseSystem
world
Modifier | Constructor and Description |
---|---|
protected |
EntityManager(int initialContainerSize)
Creates a new EntityManager Instance.
|
Modifier and Type | Method and Description |
---|---|
protected int |
create()
Create a new entity.
|
protected Entity |
createEntityInstance()
Create a new entity.
|
protected Entity |
getEntity(int entityId)
Resolves entity id to the unique entity instance.
|
boolean |
isActive(int entityId)
Check if this entity is active.
|
protected void |
processSystem()
Process the system.
|
void |
registerEntityStore(BitVector bv) |
boolean |
reset()
If all entties have been deleted, resets the entity cache - with next entity
entity receiving id
0 . |
begin, checkProcessing, dispose, end, getWorld, initialize, isEnabled, process, setEnabled, setWorld
protected EntityManager(int initialContainerSize)
protected void processSystem()
BaseSystem
processSystem
in class BaseSystem
protected Entity createEntityInstance()
protected int create()
public boolean isActive(int entityId)
Active means the entity is being actively processed.
entityId
- the entities idpublic void registerEntityStore(BitVector bv)
protected Entity getEntity(int entityId)
isActive(int)
if you need to check whether the entity is active or not.entityId
- the entities idpublic boolean reset()
If all entties have been deleted, resets the entity cache - with next entity
entity receiving id 0
. There mustn't be any active entities in
the world for this method to work. This method does nothing if it fails.
For the reset to take effect, a new World.process()
must initiate.
Copyright © 2019. All rights reserved.