float x=0; float y=0; float x1=0;//migiugoki float x2=0;//hidariugoki float a=0;//loopseigyo float b=0;//dennti void setup() { colorMode(HSB, 360, 100, 100, 100); size(500, 500); noStroke(); smooth(60); } void draw() { a+=5; x+=5; b++; haikei(x, 0); fukidasi(200, 415); robotface(70, 460); if (a<400) { robot1(x, y); if (x>400) { x=0; } robot2(x, y); boff(x, y); } else { x+=5; robot1(x, y); noLoop(); a=0; robot2(x, y); bon(x, y); dennti(170, 275); } } void mousePressed() { if (mouseX>=350&&mouseX<=440&&mouseY>=400&&mouseY<=500) { loop(); } } void haikei(float x, float y) { rectMode(CORNER); noStroke(); background(175, 23, 88); fill(214, 21, 61); rect(0, 20, width, 60);//usirokabe rect(0, 320, width, 200); rect(300, 150, 250, 30); fill(214, 0, 99, 35); rect(0, 320, width, 60); rect(300, 150, 250, 10); fill(214, 0, 57, 80); rect(0, 380, width, 25); stroke(214, 0, 15); strokeWeight(2); line(0, 380, 500, 380); line(0, 387, 500, 387); line(0, 398, 500, 398); line(0, 405, 500, 405);//konnbea line(480, 8, 480, 80);//hasigo line(460, 8, 460, 80); line(460, 25, 480, 25); line(460, 40, 480, 40); line(460, 55, 480, 55); line(460, 70, 480, 70); line(0, 10, width, 10); x1++; x2--; for (float i=0; i