@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(); }
@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); }