Separate your controllers and your characters/entities like this:
public class Controller extends InputAdapter {
private Entity _controllee;
public void setControllee(Entity toControl) {
_controllee = toControl;
}
// Override whichever InputAdapter methods you need to control your moveable objects, e.g.:
@Override
public boolean touchDown(int screenX, int screenY, int pointer, int button) {
_controllee.newSpeedX = touchpad.getKnobPercentX() * Speed;
_controllee.newSpeedY = touchpad.getKnobPercentY() * Speed;
return true;
}
}
And finally somewhere in your ApplicationListener or Screen you create an instance of the controller, attach a controllee to it via setControlle and set it as an input processor, like this:
Controller myController = new Controller();
myController.setControllee(/*one of your movable objects*/);
Gdx.input.setInputProcessor(myController);