public void readLevel(){
		Scanner fin=null;
		Scanner counter = null;

		try {
			fin=new Scanner(loc);
			counter = new Scanner(loc);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		int count = 0;
		counter.nextLine();
		while (counter.hasNextLine()) {
			counter.nextLine();
			count++;
		}
		components = new Obstacle2[count+4];
		int num = 0;
		readFirstLine(fin.nextLine());
		while(fin.hasNextLine()){
			components[num+4]=(readObstacle(fin.nextLine()));
			num++;
		}
		
		components[0]=new Obstacle2().setBounds(-50,350,100,700).setTexture("/assets/error.png");
		components[1]=new Obstacle2().setBounds(1330,350,100,700).setTexture("/assets/error.png");
		components[2]=new Obstacle2().setBounds(640,-50,1280,100).setTexture("/assets/error.png");
		components[3]=new Obstacle2().setBounds(640,750,1280,100).setTexture("/assets/error.png");
	}