예제 #1
0
 public void resumeGame() {
   if (Gdx.app.getType() == ApplicationType.Android) {
     initAssets();
     initState();
     reload();
   }
   LevelState ls = StateMachine.instance().getState(LevelState.class);
   ls.setPaused(false);
 }
예제 #2
0
 @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));
 }