??????????????£?

 

if(addX){
x+=3;
}else{
x-=3;
}
if(addY){
y+=6;
}else{
y-=6;
}
if(x<=0||x>=(width-50)){
addX=!addX;
}
if(y<=0||y>=(height-50)){
addY=!addY;
}

????????x??y??????????????????