use of com.badlogic.gdx.tests.box2d.Box2DTest in project libgdx by libgdx.
the class Box2DTestCollection method create.
@Override
public void create() {
if (this.app == null) {
this.app = Gdx.app;
Box2DTest test = tests[testIndex];
test.create();
}
InputMultiplexer multiplexer = new InputMultiplexer();
multiplexer.addProcessor(this);
multiplexer.addProcessor(new GestureDetector(this));
Gdx.input.setInputProcessor(multiplexer);
}
use of com.badlogic.gdx.tests.box2d.Box2DTest in project libgdx by libgdx.
the class Box2DTestCollection method tap.
@Override
public boolean tap(float x, float y, int count, int button) {
app.log("TestCollection", "disposing test '" + tests[testIndex].getClass().getName());
tests[testIndex].dispose();
testIndex++;
if (testIndex >= tests.length)
testIndex = 0;
Box2DTest test = tests[testIndex];
test.create();
app.log("TestCollection", "created test '" + tests[testIndex].getClass().getName());
return false;
}
Aggregations