processingで、円をクリックすると横に動いてもう一度円をクリックすると停止させるにはどうしたらいいでしょうか?
boolean button=false;
int circlex=0;
int circley=100;
void setup()
{background(100);
stroke(255);
fill(0);
ellipse(circlex,circley,50,50);if(button)
{circlex=circlex+1;}
else{button=false;}
}
void mousePressed()
{if()
button=!button;}
void mousePressedの次のifの()のなかを"円をクリックしたら"にしたいのですが、分かりません

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/06/29 07:53