void draw(){
size(150,400);
background(255);
draw_balloon();
}
void draw_balloon(){
int posY=mouseY;
color ball;
if(mouseY<=50){
posY=50;
ball=#00FF00;
}
else if(mouseY>=300){
posY=300;
ball=#FF0000;
}
else ball=255;
strokeWeight(1.5);
fill(ball);
line(width/2,posY,width/2,posY+100);
ellipse(width/2,posY,50,50);
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น