int x1,y1,x2,y2,x3,y3,x4,y4,x5,y5,x6,y6,x7,y7,x8,y8,x9,y9,x10,y10,x11,y11,x12,y12,a; PImage haikei,hi1,tori,hi2,hikosen,kikyu,heri,hi3,hi4,nobi,ufo,mozi,end; float x,y,b,x13,y13,vy,vs,vxs ; float speed; void setup(){ size(500,500); haikei=loadImage("haieki2.png"); hi1=loadImage("hikoukikako2.png"); tori=loadImage("tori2.png"); hi2=loadImage("hikoukigendai2.png"); hikosen=loadImage("hikousen2.png"); kikyu=loadImage("kikyuu2.png"); heri=loadImage("heri2.png"); hi3=loadImage("hikoukimi2.png"); hi4=loadImage("yokuwakaran2.png"); nobi=loadImage("takeko2.png"); ufo=loadImage("ufo2.png"); mozi=loadImage("mozi.png"); end=loadImage("end2.png"); a=0; x4 =0; y4=(int)random(height); x5 =-300; y5=(int)random(height); x6=-100; y6=(int)random(height); y7=500; x8=-300; x9=1200; y9=1200; x10=-50; y10=100; x11=0; y11=400; x12=ceil(random(width)); y12=ceil(random(300,400)); vy=1; frameRate(20); x1 =0; y1 =0; x2 =180; y2 =200; x3= 0; y3=0; frameRate(50); x13=ceil(random(-100,600)); y13=ceil(random(100,400)); vs=3; vxs=5; } void draw(){ if(a==0){ game(x,y); } } void game(float x,float y){ back(x1,0); planes(x2,y2); } void back(float x,float y){ image(haikei,x1,0); x1-=1; if(x1<-2725){ x1 +=1; a=2; } } void planes(float x,float y){ if(x1<=0 && x1>-800){ image(hi1,x2,y2); if (keyPressed){ if (keyCode == UP)y2-=3; if (keyCode == DOWN)y2+=3; } }else if(x1<=-800 && x1>=-2000){ image(hi2,x2,y2); if (keyPressed){ if (keyCode == UP)y2-=4; if (keyCode == DOWN)y2+=5; } }else if(x1<=-2000 && x1>=-3600){ image(hi3,x2,y2); if (keyPressed){ if (keyCode == UP)y2-=5; if (keyCode == DOWN)y2+=5; } } //PIYO=PIYO image(tori,x4,y4); x4++; y4+=(int)random(-10,10); image(tori,x5,y5); x5+=1; y5+=(int)random(-10,10); image(tori,x6,y6); x6+=1; y6+=(int)random(-10,10); //BALLON FUWA=FUWA if(frameCount>800){ image(kikyu,320,y7); y7-=3; } //AIRSHIP BYUUUN if(frameCount>1150){ image(hikosen,x8,100); x8+=2; } //HELICOPTER PIRO=PIRO if(frameCount>1500){ image(heri,x9,y9); x9-=5; y9-=4; } //NANKASUGOIKEDOYOKUWAKARANNORIMONO if(frameCount>2310){ image(hi4,x10,y10); image(hi4,x10,y10+220); x10++; //y10--; } //TAKEKOPUTA-!! if(frameCount>2450){ image(nobi,x11,y12); y12 +=vy; x11+=3; if(y12>400 || y12<300){ vy=-vy; } } //UFO if(frameCount>2000){ image(ufo,x13,y13); x13=x13+vs; y13=y13+vxs; if(x13>600 || x13<-100){ vs=vs*-1; } if(y13>400 || y13<100){ vxs=+vxs*-1; } } //sousa image(mozi,10,450); if(frameCount>2700){ image(end,0,0); } } //参考サイト //http://9ryulabo.com/processing-learner/4-1.html