public abstract class IntervalEntityProcessingSystem extends IntervalEntitySystem
A typical usage would be to regenerate ammo or health at certain intervals, no need to do that every game loop, but perhaps every 100 ms. or every second.
acc
subscription
world
Constructor and Description |
---|
IntervalEntityProcessingSystem(Aspect.Builder aspect,
float interval)
Creates a new IntervalEntityProcessingSystem.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
process(Entity e)
Process a entity this system is interested in.
|
protected void |
processEntities(Bag<Entity> entities) |
protected void |
processSystem()
Process the system.
|
checkProcessing, getIntervalDelta, getTimeDelta
getEntities, inserted, inserted, inserted, removed, removed, removed, setWorld
getEntityIds, getSubscription
begin, dispose, end, getWorld, initialize, isEnabled, process, setEnabled
public IntervalEntityProcessingSystem(Aspect.Builder aspect, float interval)
aspect
- the aspect to match entitiesinterval
- the interval at which the system is processedprotected abstract void process(Entity e)
e
- the entity to processprotected void processSystem()
BaseSystem
processSystem
in class BaseSystem
Copyright © 2019. All rights reserved.