public void update() {
		
		// Moves Character or Scrolls Background accordingly.

		if (speedX <= 0) {
			centerX += speedX;
			// Do not scroll the background
			bg1.setSpeed(0);
            bg2.setSpeed(0);			
		}
		else {
			if (centerX <= 200) {
	            centerX += speedX;
	        }
			else {
				final int speed = -MOVESPEED / Starter.PACE;
				bg1.setSpeed(speed);
				bg2.setSpeed(speed);				
			}
		}
		 				
		// Updates Y Position
		centerY += speedY;
		
		// Handles Jumping
		speedY += 1;
		
		if (speedY > 3) {
			setJumped(true);
		}

		// Prevents going beyond X coordinate of 0
		if (centerX + speedX <= 60) {
			centerX = 61;
		}
		
		// Collision detection (body)
		rtop.setRect(centerX - 34, centerY - 63, 68, 63);
		rbot.setRect(rtop.getX(), rtop.getY() + 63, 68, 64);
		
		// Collision detection (hands)
		rlefth.setRect(rtop.getX() - 26, rtop.getY()+32, 26, 20);
		rrighth.setRect(rtop.getX() + 68, rtop.getY()+32, 26, 20);

		// Collision detection (feet)
		rleftf.setRect(centerX - 50, centerY + 20, 50, 15);
		rrightf.setRect(centerX, centerY + 20, 50, 15);		
		
		// Collision detection (the critical area)
		collisionArea.setRect(centerX - 110, centerY - 110, 180, 180);
	}