@Override
    public void show() {
        super.show();
        this.x = r.nextFloat();
        this.y = r.nextFloat();
        float angle = r.nextFloat() * 2 * 3.14159f;
        this.vx = (float)java.lang.Math.cos(angle);
        this.vy = (float)java.lang.Math.sin(angle);
        //todo instead of going back to main menu, pause the game with pause screen?
        Gdx.input.setCatchBackKey(true);
        getStage().addListener(new InputListener() {
            @Override
            public boolean keyUp(InputEvent event, int keycode) {
                if (keycode == Input.Keys.BACK || keycode == Input.Keys.ESCAPE) {
                    app.setScreen(app.getMainScreen());
                    return true;
                } else {
                    return false;
                }
            }
        });
    }
@Override
    public void show() {
        super.show();
        this.x = r.nextFloat();
        this.y = r.nextFloat();
        float angle = r.nextFloat() * 2 * 3.14159f;
        this.vx = (float)java.lang.Math.cos(angle);
        this.vy = (float)java.lang.Math.sin(angle);
       
        Gdx.input.setCatchBackKey(true);
        getStage().addListener(new InputListener() {
            @Override
            public boolean keyUp(InputEvent event, int keycode) {
                if (keycode == Input.Keys.BACK || keycode == Input.Keys.ESCAPE) {
                    app.setScreen(app.getMainScreen());
                    return true;
                } else {
                    return false;
                }
            }
        });
    }
@override public void show() { super.show(); this.x = r.nextfloat(); this.y = r.nextfloat(); float angle = r.nextfloat() * 2 * 3.14159f; this.vx = (float)java.lang.math.cos(angle); this.vy = (float)java.lang.math.sin(angle); gdx.input.setcatchbackkey(true); getstage().addlistener(new inputlistener() { @override public boolean keyup(inputevent event, int keycode) { if (keycode == input.keys.back || keycode == input.keys.escape) { app.setscreen(app.getmainscreen()); return true; } else { return false; } } }); }