public void update(){
	if(speedX <0){
		centerX += speedX;
	} 
	if(speedX ==0 || speedX < 0){
		bg1.setSpeedX(0);
		bg2.setSpeedX(0);
	}
	if(centerX<=200 && speedX > 0){
			centerX += speedX;
	}//end scrolling else
	if(centerY + speedY >=GROUND){
		centerY = GROUND;
	}
	if(jumped==true){
		speedY+=1;
		
		if(centerY+speedY >=GROUND){
			centerY = GROUND;
			speedY = 0;
			jumped = false;
		}
	}
	//prevents going beyond zero
	if(centerX + speedX<=60){
		centerX = 61;
	}
}//end update