public void loadTowerTypes(){
		int x = 1;
		try {
			while(true){
				InputStream is = Main.class.getResourceAsStream(RES_DIR + "towers/" + x + ".cfg");
				if(is==null){break;}
				byte[] b = new byte[Main.class.getResource(RES_DIR + "towers/" + x + ".cfg").openConnection().getContentLength()];
				is.read(b);
				is.close();
				String s = new String(b);
				TowerType t = new TowerType(m, x);
				
				t.setType(findValue(s,"type"));
				t.setAttackSpeed( Double.parseDouble(findValue(s,"attackSpeed")) );
				t.setDamage( Double.parseDouble(findValue(s,"damage")) );
				t.setProjectileSpeed( Double.parseDouble(findValue(s,"projectileSpeed")) );
				t.setProjectileAnimationStandDuration( Integer.parseInt(findValue(s, "projectileAnimationStandDuration")) );
				t.setProjectileAnimationDeathDuration( Integer.parseInt(findValue(s, "projectileAnimationDeathDuration")) );
				t.setRange( Double.parseDouble(findValue(s, "range")) );
				t.setAnimationStandDuration( Integer.parseInt(findValue(s, "animationStandDuration")) );
				t.setAnimationPreAttackDuration( Integer.parseInt(findValue(s, "animationPreAttackDuration")) );
				t.setAnimationPostAttackDuration( Integer.parseInt(findValue(s, "animationPostAttackDuration")) );
				t.setBase( findTowerTypeById(Integer.parseInt(findValue(s, "base"))) );
				t.setCost( Integer.parseInt(findValue(s, "cost")) );
				t.setDescription( findValue(s, "description") );
				t.setShootingAir( Boolean.parseBoolean(findValue(s, "shootingAir")) );
				if(t.getType().equals(TowerType.TOWER_TYPE_MULTI_TARGET))
					t.addArg("maxTargets", Integer.parseInt(findValue(s, "maxTargets")));
				if(t.getType().equals(TowerType.TOWER_TYPE_SIEGE))
					t.addArg("splashRadius", Double.parseDouble(findValue(s, "splashRadius")));
				if(t.getType().equals(TowerType.TOWER_TYPE_DEBUFFER)){
					String s2 = findValue(s, "debuffs");
					ArrayList<BuffType> debuffs = new ArrayList<BuffType>();
					for(String s3 : s2.split(":")){
						if(s3.equals("")) continue;
						debuffs.add(findBuffTypeById(Integer.parseInt(s3)));
					}
					t.addArg("debuffs", debuffs);
				}
				////////////////////////////////////////////////////////
				t.setAnimationStand( ImageIO.read(Main.class.getResourceAsStream(RES_DIR + "towers/" + x + "-stand.png")) );
				t.setAnimationPreAttack( ImageIO.read(Main.class.getResourceAsStream(RES_DIR + "towers/" + x + "-preAttack.png")) );
				t.setAnimationPostAttack( ImageIO.read(Main.class.getResourceAsStream(RES_DIR + "towers/" + x + "-postAttack.png")) );
				t.setProjectileAnimationStand( ImageIO.read(Main.class.getResourceAsStream(RES_DIR + "towers/" + x + "-projectileStand.png")) );
				t.setProjectileAnimationDeath( ImageIO.read(Main.class.getResourceAsStream(RES_DIR + "towers/" + x + "-projectileDeath.png")) );
				setNewTowerType(t);
				x++;
			}
		}
		catch (MalformedURLException e) {e.printStackTrace();}
		catch (IOException e) {e.printStackTrace();}
		
	}