In my almost finished game I want to set a new screen on game over. I got my game over method:
private void gameOver(Label score) {
for (Body body : worldBodies) {
world.destroyBody(body);
}
dispose();
((Game) Gdx.app.getApplicationListener()).setScreen(new GameOver());
}
Whenever the method gets called the screen freezes for a second and the game crashes with this statement:
JNI DETECTED ERROR IN APPLICATION
09-02 22:04:34.036 391-425/com.joelbrun.jetskirider.android A/libc﹕ Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 425 (GLThread 29501)