private void drawDebug() { debugRenderer.setProjectionMatrix(cam.combined); debugRenderer.begin(ShapeType.Line); for (Block block : world.getBlocks((int) CAMERA_WIDTH, (int) CAMERA_HEIGHT)) { Rectangle rect = block.getBounds(); debugRenderer.setColor(new Color(1, 0, 0, 1)); debugRenderer.rect(rect.x, rect.y, rect.width, rect.height); } for (Entity e : world.getEntities()) { Rectangle rect = e.getBounds(); debugRenderer.setColor(new Color(0, 1, 1, 1)); debugRenderer.rect(rect.x, rect.y, rect.width, rect.height); } Digger jaxon = world.getJaxon(); Rectangle rect = jaxon.getBounds(); debugRenderer.setColor(new Color(0, 1, 0, 1)); debugRenderer.rect(rect.x, rect.y, rect.width, rect.height); debugRenderer.end(); }
private void drawJaxon() { Digger jaxon = world.getJaxon(); jaxon.render(spriteBatch); }