public void update(){
		updateCounter++;
		playerX = player.x;
		playerY = player.y;
		

		
		if (updateCounter == 1) {
			if (y < playerY) {
				// laser is above player
				dy = 1;
			}
			if (y > playerY) {
				// laser is below player
				dy = -1;
			}
			if (x < playerX) {
				dx = 2;
			}
			if (x > playerX) {
				dx = -2;
			}
		}
		if ((Math.abs(y - playerY) < 10) && (Math.abs(x - playerX) < 10)) {
			if (y < playerY) {
				// laser is above player
				dy = 1;
			}
			if (y > playerY) {
				// laser is below player
				dy = -1;
			}
			if (x < playerX) {
				dx = 2;
			}
			if (x > playerX) {
				dx = -2;
			}
		}

		if (updateCounter == 50) {
			updateCounter = 0;
		}
		setPosition(x,y);
	}