30313233343536373839
@Override public void onStateChange() { GameEngine engine = CoreRegistry.get(GameEngine.class); GameState state = engine.getState(); if (state instanceof StateMainMenu) { engine.shutdown(); } } }