Fixed debug renderer.

This commit is contained in:
Jeasonfire 2015-05-17 02:41:54 +03:00
parent 508a20152c
commit 96f2c2ac7a

View File

@ -203,6 +203,9 @@ public class RenderingSystem extends EntitySystem {
batch.begin();
for (int i = 0; i < entities.size(); i++) {
CRenderedObject renderedObject = rom.get(entities.get(i));
if (renderedObject == null) {
continue;
}
for (String channel : renderedObject.getChannels()) {
SpriteSequence currSequence = renderedObject.getSequence(renderedObject.getCurrentSequence(channel));
int currFrame = (int) Math.floor(renderedObject.getCurrentFrame(channel));
@ -298,7 +301,7 @@ public class RenderingSystem extends EntitySystem {
}
public void updateEntities(Engine engine) {
entities = engine.getEntitiesFor(Family.getFor(CRenderedObject.class, CPhysics.class));
entities = engine.getEntitiesFor(Family.getFor(CPhysics.class));
}
public boolean getDebug() {