答案 0 :(得分:0)
使用JBox2D DebugDraw class for Slick2D添加调试图很简单。将以下代码放在init
方法中:
Slick2DJBox2DDebugDraw debugDraw = new Slick2DJBox2DDebugDraw(gameContainer);
debugDraw.setFlags(DebugDraw.e_shapeBit);
world.setDebugDraw(debugDraw); // Where world is your JBox2D world