@Override
	public void update(long delta) {
		float pI;
		System.out.println("particle start");
		for (pI = particlesPerTick; pI >= 1; pI--) {
			Particle p = new Particle(pos.getX() + Util.randomInRange(-xsize, xsize), pos.getY() + Util.randomInRange(0, ysize), 320, 60, 20, lifespan,
					Texture.getTexture("raindrop"));
			@SuppressWarnings("unused")
			float angle = Util.randomInRange(0, 360);
			// p.setVelocity((float)Math.cos(angle*Util.DEGTORAD), (float)Math.sin(angle*Util.DEGTORAD));
			p.setVelocity(0, 5f);
			System.out.println("particle created");
		}
		if (pI > 0) {
			particleBuffer += pI;
		}
		if (particleBuffer >= 1) {
			new Particle(pos.getX() + Util.randomInRange(-xsize, xsize), pos.getY() + Util.randomInRange(0, ysize), 320, 60, 20, delta,
					Texture.getTexture("material/particle.png"));

			particleBuffer -= 1;
		}

	}