void setup(){
size(300,300);
}
void draw(){
background(#ffffff);
int posX=mouseX;
int posY=mouseY;
if(posY<100){
fill(#F28EED);
}else if(posY>=100 && posY<200){
fill(#B48EF2);
}else{
fill(#486FD8);
}
draw_balloon(posX,posY);
}
void draw_balloon(int posX,int posY){
strokeWeight(4);
stroke(#623936);
int string_length =70;
line(posX,posY,posX,posY+ string_length);
ellipse(posX,posY,50,50);
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น