public abstract class IntervalIteratingSystem extends IntervalSystem
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 |
---|
IntervalIteratingSystem(Aspect.Builder aspect,
float interval)
Creates a new IntervalEntityProcessingSystem.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
process(int entityId)
Process a entity this system is interested in.
|
protected void |
processSystem()
Process the system.
|
checkProcessing, getIntervalDelta, getTimeDelta
getEntityIds, getSubscription, inserted, inserted, removed, removed, setWorld
begin, dispose, end, getWorld, initialize, isEnabled, process, setEnabled
public IntervalIteratingSystem(Aspect.Builder aspect, float interval)
aspect
- the aspect to match entitiesinterval
- the interval at which the system is processedprotected abstract void process(int entityId)
entityId
- the entity to processprotected void processSystem()
BaseSystem
processSystem
in class BaseSystem
Copyright © 2019. All rights reserved.