public void update(long delta) {
		time += delta;
		if (time > nextFruitTime && !stopped) {
			nextFruitTime = rate.getTime();
			time = 0;
			
			Transform3D t3dOffset = new Transform3D();
			int x = rand.nextInt(xGridCount);
			int y = rand.nextInt(yGridCount);
			t3dOffset.setTranslation(new Vector3d(xgrid[x][y], ygrid[x][y], 0.25));
			Fruit fruit = factory.getFruit();
			fruit.setCollisionListner(runner);
			fruit.setTranslation(t3dOffset);

			BranchGroup bg = new BranchGroup();
			bg.setCapability(TransformGroup.ENABLE_COLLISION_REPORTING);
			bg.setCapability(TransformGroup.ENABLE_PICK_REPORTING);
			bg.setCapability(BranchGroup.ALLOW_DETACH);

			detector = new CollisionDetector(bg);
			bg.addChild(fruit.getFallingAnimation());
			bg.addChild(detector);

			fruit.registerWithShaker(shaker);
			fruit.setBranchGroup(bg);
			fruit.regisetWithCollisionDetector(detector);

			// Shadow
			BranchGroup shadowBg = new BranchGroup();
			shadowBg.setCapability(BranchGroup.ALLOW_DETACH);
			
			SphereObject s = new SphereObject(0.01f);
			FakeShadow fs = new FakeShadow((GeometryArray) s.getGeometry(), new Color3f(0.2f, 0.2f, 0.2f));

			Transform3D fruitShadowT3D = new Transform3D();
			fruitShadowT3D.setTranslation(new Vector3d(xgrid[x][y], ygrid[x][y], 0.001));
			fruitShadowT3D.setRotation(new AxisAngle4d(1.0, 0.0, 0.0, Math.PI/2));
			fs.getTransformGroup().setTransform(fruitShadowT3D);
			
			shadowBg.addChild(fs);
			fruit.addShadow(shadowBg);
			
			
			runner.addFruit(bg);
			runner.addShadow(shadowBg);
			fruits.add(fruit);
		}

		for(Iterator<Fruit> it = fruits.iterator(); it.hasNext(); )
		{
			Fruit fruit = it.next();
			fruit.update();
			if(fruit.getDeleteFruit())
			{
				BranchGroup b = fruit.getBranchGroup(); 
				BranchGroup shadowBg = fruit.getShadow();

				it.remove();
				runner.removeFruit(b);
				runner.removeShadow(shadowBg);
			}
		}
		
	}