@perfecticus said:
The default mappings in SimpleApplication is
[java]
if (inputManager.hasMapping(INPUT_MAPPING_EXIT)) {
inputManager.deleteMapping(INPUT_MAPPING_EXIT);
}
if (inputManager.hasMapping(INPUT_MAPPING_CAMERA_POS)) {
inputManager.deleteMapping(INPUT_MAPPING_CAMERA_POS);
}
if (inputManager.hasMapping(INPUT_MAPPING_MEMORY)) {
inputManager.deleteMapping(INPUT_MAPPING_MEMORY);
}
if (inputManager.hasMapping(INPUT_MAPPING_HIDE_STATS)) {
inputManager.deleteMapping(INPUT_MAPPING_HIDE_STATS);
}
[/java]
And for the record, these two:
INPUT_MAPPING_CAMERA_POS
INPUT_MAPPING_MEMORY
Are setup by the DebugKeysAppState and so will a) happen after simpleInitApp(), and b) can be more easily removed by just removing the app state (or just not including it).
<cite>@pspeed said:</cite>
And for the record, these two:
INPUT_MAPPING_CAMERA_POS
INPUT_MAPPING_MEMORY
Are setup by the DebugKeysAppState and so will a) happen after simpleInitApp(), and b) can be more easily removed by just removing the app state (or just not including it).
so just adding these lines to simpleinitapp will do the trick ?
Removing an app state based on class:
stateManager.detach( stateManager.getState( SomeClass.class ) );
So replace the word “SomeClass” with “DebugKeysAppState” and you will no longer have the debug keys setup.
Though if you don’t want it in the first place it is often easier to instantiate SimpleApplication with just the states you want.
So something like:
[java]
public class MyGame extends SimpleApplication {
public MyGame() {
super( new MyAppState(), new MyOtherAppState(), new FlyCamAppState(), new StatsAppState() );
}
}
[/java]
In fact, in a well architected game, simpleInitApp and simpleUpdate are empty or close to empty.