import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.UnsupportedAudioFileException; import java.io.*; import java.util.Arrays; public class MapReader implements Serializable { public static int x = 0; public static int y = 0; public static int TileX = 0; public static int TileY = 0; //Input game map /* 1: Normal Grass 2: Left Grass: 3: Right Grass: Grass Tiling: qwe asd zxc !: Slime v= background Grass: */ //o = steel public static void inputMap(String filePath) throws IOException, SpriteException, UnsupportedAudioFileException, LineUnavailableException { x = 0; y = 0; GameFrame.game.enemy.clear(); GameFrame.game.particleTiles.clear(); for(int i=0; i0&&GameFrame.game.map[x][y-1]==null) { GameFrame.game.particleTiles.add(GameFrame.game.map[x][y]); } } else if(file.charAt(i)=='o'){ newTile("img/tiles/boxes/steel.png"); GameFrame.game.map[x][y].movable = true; } x+=1; } } public static void newTile(String filePath) throws IOException, SpriteException { GameFrame.game.map[x][y]=(new SingleTile(TileX,TileY, new BufferedImageWrapper((filePath)))); } }