public void update(int delta) {
		
		for (Building b : buildings) {
			if (b.getStatus()) {
				b.setBuildingtimeLeft(b.getBuildingtimeLeft() - delta);
			}
			if (b.getBuildingtimeLeft() <= 0) {
				b.upgrade();
			}
		}
		
		for (Building b : buildings) {
			if (b instanceof ProductionBuilding) {
				b.setTimeLeft(b.getTimeLeft()-delta);
				if (b.getTimeLeft() <= 0) {
					changeGold(((ProductionBuilding) b).getGoldProcuction());
					changeFood(((ProductionBuilding) b).getFoodProduction());
					b.setTimeLeft(1000);
				}
			}	
		}
	}