@t0neg0d said: Okay, so this section of code from Main.java[java]
public void onAction(String binding, boolean isPressed, float tpf) {
System.out.println(“Test 1”);
if (binding.equals(“Next”)) {
System.out.println(“Test 2”);
if (isPressed) {
System.out.println(“Test 3”);
stateManager.detach(mainMenu);
stateManager.attach(game);
}
}
}
[/java]if you add the above println’s… which actually print?
Next question is, is this mapping being removed once you load game? If not, it would just try and remove a state that doesn’t exist and then reinitialize the game.
You may want to move these specific bindings to the AppState they apply too, so in initialize of MainMenu these bindings would be added and on cleanup of MainMenu they would be removed. That way you don’t have code lingering around that applies to a specific AppState unintentionally
It works the other way around though. It is working, but just not when it goes to the Game State.