int x=100;
int direction=1;
void setup(){
size(640,640);
background(255);
}
void draw(){
background(255);
fill(255,0,255);
ellipse(x,200,50,50);
x=x+1*direction;
if(x>=575||x<=25)
direction=-direction;
}
int x=100;
int direction=1;
void setup(){
size(640,640);
background(255);
}
void draw(){
background(255);
fill(255,0,255);
ellipse(x,200,50,50);
x=x+1*direction;
if(x>=575||x<=25)
direction=-direction;
}
本文标题:07 教孩子学编程 画运动的圆
本文链接:https://www.haomeiwen.com/subject/primghtx.html
网友评论