public void resumeGame() { if (Gdx.app.getType() == ApplicationType.Android) { initAssets(); initState(); reload(); } LevelState ls = StateMachine.instance().getState(LevelState.class); ls.setPaused(false); }
@Override public void pause() { LevelState ls = StateMachine.instance().getState(LevelState.class); ls.setPaused(true); GlobalState state = StateMachine.instance().getState(GlobalState.class); state.getProfileService().persist(); // GameStage stage = (GameStage) ls.getStage(); // stage.retry(); ls.getEvents() .enqueue( state .pool() .events() .gameplayEvent( GenericEvent.GAMEEVENT_TYPE_LOSE, 0, GenericEvent.GAMEEVENT_LOSE_FALLOFFBOARD)); }