public void logic(int safeGround){
		logic();
		if(precY+height>safeGround){
			precY=y=safeGround-height;
			if(velY>5.0F){
				velY=-velY*0.5F;
			}
			else{
				velY=0;
				isJumping=false;
			}
		}
		if(precX<0){precX=x=0; velX=-velX;}
		if(precX+width>g.getMain().getWidth()){precX=x=g.getMain().getWidth()-width; velX=-velX;}
	}