Ejemplo n.º 1
0
  @Override
  public void enter(GameContainer container, StateBasedGame game) throws SlickException {
    super.enter(container, game);

    map = new Map(128, 128);
    mapGenerator = new MapGeneratorThread(131183, map);
    mapGenerator.start();
  }
Ejemplo n.º 2
0
  @Override
  public void update(GameContainer gc, StateBasedGame game, int delta) throws SlickException {
    progressBar.setProgress(mapGenerator.getProgress());

    if (mapGenerator.isFinished()) game.enterState(Game.STATE_CITY_VIEW);
  }