Пример #1
0
  private void initState() {
    effects = new EffectsManager();
    // effects.initOtgy(1000);
    effects.initBitbreak(1000);

    menuStage = new MenuStage(effects);
    gameStage = new GameStage(effects);
    lostStage = new LostStage(effects);
    finishStage = new FinishStage(effects);
    pauseStage = new PauseStage(effects);
    seedStage = new SeedStage(effects);
    StateMachine.instance().getState(MenuState.class).setStage(menuStage);
    StateMachine.instance().getState(SeedState.class).setStage(seedStage);
    StateMachine.instance().getState(LevelState.class).setStage(gameStage);
    StateMachine.instance().getState(LevelWinningState.class).setStage(gameStage);
    StateMachine.instance().getState(LevelLosingState.class).setStage(gameStage);
    StateMachine.instance().getState(LevelPauseState.class).setStage(gameStage);
    StateMachine.instance().getState(LevelInitState.class).setStage(gameStage);
    StateMachine.instance().getState(LevelLostState.class).setStage(lostStage);
    StateMachine.instance().getState(LevelWonState.class).setStage(finishStage);
    StateMachine.instance().getState(LevelPauseState.class).setStage(pauseStage);
    GlobalState gs = StateMachine.instance().getState(GlobalState.class);
    gs.setGravitySensorEnabled(Gdx.app.getType() == ApplicationType.Android);
  }