public void deployLevel(int targetLevel) { currentPlayField = levelManager.skipToLevel(targetLevel); currentPlayField.setBackground(new ColorBackground(BACKGROUND_COLOR)); resetPlayers(); playerBlocks = new SpriteGroup("playerBlocks"); levelBlocks = (currentPlayField.getGroup("levelBlockGroup")); currentPlayField.addGroup(playerBlocks); currentPlayField.addGroup(overlayGroup); // currentPlayField.addCollisionGroup(players, null, new TronBounds( // currentPlayField.getBackground())); }
public void initLevelManager() { levelManager = new LevelManager(this); String levelFilesDirectory = Resources.getString("levelFilesDirectory"); String levelNamesFile = Resources.getString("levelNamesFile"); levelManager.makeLevels(levelFilesDirectory, levelNamesFile); }