Process entities only if they are active and not removed
This commit is contained in:
parent
042282646b
commit
01c6a777cb
@ -27,8 +27,11 @@ public abstract class EntitySystem extends BaseSystem {
|
||||
}
|
||||
|
||||
public void process(float dt) {
|
||||
for (int i = 0, n = getEntities().size; i < n; i++) {
|
||||
processEntity(entities.get(i), dt);
|
||||
for (int i = 0, n = entities.size; i < n; i++) {
|
||||
Entity entity = entities.items[i];
|
||||
if (!entity.removed && entity.active) {
|
||||
processEntity(entity, dt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user