我做了一個圓形向左移動,但是我不懂怎麼讓這個圓形停下。 我找了書,沒找到。 QAQ求解答
//declare vars
int xBall1;
void setup() {
size(500, 500);
//initialize x coordinate to right side of the screen
xBall1 = width-50;
}
void draw() {
background(100);
//ball that goes from right to left...
ellipse( xBall1 , height/4 , 80, 80);
println(xBall1);
xBall1 = xBall1 - 1;
}