Hello,
Do we really need a FirstPersonHandler in a debug state ?
I mean, if we want to have the keyBindings, a FirstPersonHandler is automatically added.
public class DebugGameState extends TextGameState {
...
public DebugGameState() {
this(true);
}
public DebugGameState(boolean handleInput) {
super("F4 - toggle stats");
init(handleInput);
}
private void init(boolean handleInput) {
...
// Initial InputHandler
if (handleInput) {
input = new FirstPersonHandler(DisplaySystem.getDisplaySystem().getRenderer().getCamera(), 15.0f, 0.5f);
initKeyBindings();
}
...
}
I'd rather like to see the keys binded by default and a FirstPersonHandler if handleInput is true like this :
private void init(boolean handleInput) {
...
// Initial InputHandler
input = new InputHandler();
if (handleInput) {
FirstPersonHandler firstPersonHandler= new FirstPersonHandler(DisplaySystem.getDisplaySystem().getRenderer().getCamera(), 15.0f, 0.5f);
input.addToAttachedHandlers(firstPersonHandler);
}
initKeyBindings();
...
}
Or is there something I don't understand with the DebugGameState ?
Thank you for your help.