public void update() {
		time++;
		if (lifeTime - 10 > time) {
			alpha -= 0.1f;
		}
		if (time > lifeTime) {
			removed = true;
			return;
		}
		xa = (float) ((rx + direction.x) * speed);
		ya = (float) ((ry + direction.y) * speed);
		
		int xStep = (int) Math.abs(xa * 100);
		for (int i = 0; i < xStep; i++) {
			if (!isSolidTile(xa / xStep, 0)) {
				x += xa / xStep;
			} else {
				xa = 0;
			}
		}
		int yStep = (int) Math.abs(ya * 100);
		for (int i = 0; i < yStep; i++) {
			if (!isSolidTile(0, ya / yStep)) {
				y += ya / yStep;
			} else {
				ya = 0;
			}
		}
	}