List of usage examples for com.badlogic.gdx.math.collision BoundingBox getCenterY
public float getCenterY()
From source file:com.quadbits.gdxhelper.actors.ParticleEffectActor.java
License:Apache License
@Override public void drawDebug(ShapeRenderer shapes) { super.drawDebug(shapes); if (!this.getDebug() || effect == null) return;//w w w . ja va2s.co m shapes.set(ShapeRenderer.ShapeType.Line); shapes.setColor(getStage().getDebugColor()); BoundingBox boundingBox = effect.getBoundingBox(); float centerX = boundingBox.getCenterX(); float centerY = boundingBox.getCenterY(); float width = boundingBox.getWidth(); float height = boundingBox.getHeight(); shapes.rect(centerX - width / 2, centerY - height / 2, width, height); }