protected void updateLogicalLayer(final ReadOnlyTimer timer) {
hud.getLogicalLayer().checkTriggers(timer.getTimePerFrame());
}
private void resetBalls(final int ballCount) {
final UIContainer container = _ballFrame.getContentPanel();
container.setLayout(null);
container.detachAllChildren();
balls = new BallComponent[ballCount];
// Create a texture for our balls to use.
final SubTex tex = new SubTex(TextureManager.load("images/ball.png",
Texture.MinificationFilter.NearestNeighborNoMipMaps, TextureStoreFormat.GuessCompressedFormat, true));
// Add balls
for (int i = 0; i < balls.length; i++) {
final BallComponent ballComp = new BallComponent("ball", tex, Ball.radius * 2, Ball.radius * 2, container
.getContentWidth(), container.getContentHeight());
container.add(ballComp);
balls[i] = ballComp;
}
_ballFrame.setTitle("Bubbles - " + ballCount + " balls");
}