1.音樂以放入
2.未來加強
1.增加預備出現拍子的前置圖片
2.改善目前介面的美工
3.增加斷連段
4.遊戲音樂結速和開始
5.可能增加音樂譜面
import ddf.minim.*;
Minim minim;
AudioPlayer bgm;
boolean a1=false;
boolean a12=false;
boolean s1=false;
boolean s12=false;
boolean d1=false;
boolean f1=false;
boolean z1=false;
boolean x1=false;
boolean c1=false;
boolean v1=false;
boolean y1=false;
boolean u1=false;
boolean i1=false;
boolean o1=false;
boolean h1=false;
boolean j1=false;
boolean k1=false;
boolean l1=false;
boolean q1=false;
boolean d12=false;
boolean f12=false;
boolean z12=false;
boolean x12=false;
boolean c12=false;
boolean v12=false;
boolean y12=false;
boolean u12=false;
boolean i12=false;
boolean o12=false;
boolean h12=false;
boolean j12=false;
boolean k12=false;
boolean l12=false;
boolean q12=false;
boolean take=false;
int s123=0;
int sice=0;
int siceten=0;
int sicehun=0;
int m=0;
void setup(){
size(600,650);
minim = new Minim(this);
bgm = minim.loadFile("aas.mp3");
bgm.play();
}
void sicetake()//////////////////// 計分判斷
{
if(sice<10)
{
sice++;
}
if(sice==10)
{
sice=0;
if(siceten<10)
{
siceten++;
}
if(siceten==10)
{
siceten=0;
if(sicehun<10)
{
sicehun++;
}
}
}
s123=0;
}
void draw()
{
////////////////////////////////顯示記分判斷
if(s1==true&&s12==true)
{
sicetake();
s12=false;
}
else if(a1==true&&a12==true)
{
sicetake();
a12=false;
}
else if(d1==true&&d12==true)
{
sicetake();
d12=false;
}
else if(f1==true&&f12==true)
{
sicetake();
f12=false;
}
else if(z1==true&&z12==true)
{
sicetake();
z12=false;
}
else if(x1==true&&x12==true)
{
sicetake();
x12=false;
}
else if(c1==true&&c12==true)
{
sicetake();
c12=false;
}
else if(v1==true&&v12==true)
{
sicetake();
v12=false;
}
else if(y1==true&&y12==true)
{
sicetake();
y12=false;
}
else if(u1==true&&u12==true)
{
sicetake();
u12=false;
}
else if(i1==true&&i12==true)
{
sicetake();
i12=false;
}
else if(o1==true&&o12==true)
{
sicetake();
o12=false;
}
else if(h1==true&&h12==true)
{
sicetake();
h12=false;
}
else if(j1==true&&j12==true)
{
sicetake();
j12=false;
}
else if(k1==true&&k12==true)
{
sicetake();
k12=false;
}
else if(l1==true&&l12==true)
{
sicetake();
l12=false;
}
///////////////////////////////////////////////////
background(255);
int m = millis()/1000;
if(m==1)
{
}
if(m==2)
{
}
if(m==3)
{
a1=true;
s1=true;
}
if(m==4)
{
a1=false;
s1=false;
}
if(m==5)
{
h1=true;
}
if(m==6)
{
h1=false;
}
if(m==7)
{
j1=true;
h1=true;
}
if(m==8)
{
j1=false;
h1=false;
}
if(m==9)
{
d1=true;
}
if(m==10)
{
d1=false;
c1=true;
}
if(m==11)
{
c1=false;
}
if(m==12)
{
a1=true;
}
if(m==13)
{
s1=true;
a1=false;
}
if(m==14)
{
d1=true;
s1=false;
}
if(m==15)
{
f1=true;
d1=false;
}
if(m==16)
{
v1=true;
f1=false;
}
if(m==17)
{
c1=true;
v1=false;
}
if(m==18)
{
x1=true;
c1=false;
}
if(m==19)
{
z1=true;
x1=false;
}
if(m==20)
{
y1=true;
z1=false;
}
if(m==21)
{
u1=true;
y1=false;
}
if(m==22)
{
i1=true;
u1=false;
}
if(m==23)
{
o1=true;
i1=false;
}
if(m==24)
{
l1=true;
o1=false;
}
if(m==25)
{
k1=true;
l1=false;
}
if(m==26)
{
j1=true;
k1=false;
}
if(m==27)
{
h1=true;
j1=false;
}
if(m==28)
{
h1=false;
a1=true;
}
if(m==29)
{
z1=true;
a1=false;
}
if(m==30)
{
y1=true;
z1=false;
}
if(m==31)
{
h1=true;
y1=false;
}
if(m==32)
{
h1=false;
}
if(m==33)
{
}
if(m==34)
{
}
if(m==35)
{
}
if(m==36)
{
}
if(m==37)
{
}
if(m==38)
{
}
if(m==39)
{
}
if(m==40)
{
}
fill(255);
/////////////////////////////////////////////第一排
rect(50, 100, 100, 100);
rect(180, 100, 100, 100);
rect(310, 100, 100, 100);
rect(440, 100, 100, 100);
///////////////////////////////////////////////第二排
rect(50, 230, 100, 100);
rect(180, 230, 100, 100);
rect(310, 230, 100, 100);
rect(440, 230, 100, 100);
//////////////////////////////////////////////第三排
rect(50, 360, 100, 100);
rect(180, 360, 100, 100);
rect(310, 360, 100, 100);
rect(440, 360, 100, 100);
//////////////////////////////////////////////第四排
rect(50, 490, 100, 100);
rect(180, 490, 100, 100);
rect(310, 490, 100, 100);
rect(440, 490, 100, 100);
/////////////////////////////////////////////////////////
if(a1)
{
fill(0);
rect(50, 100, 100, 100);
}
if(s1)
{
fill(0);
rect(180, 100, 100, 100);
}
if(d1)
{
fill(0);
rect(310, 100, 100, 100);
}
if(f1)
{
fill(0);
rect(440, 100, 100, 100);
}
/////////////////////////////////////////////////////第一排
if (z1)
{
fill(0);
rect(50, 230, 100, 100);
}
if(x1)
{
fill(0);
rect(180, 230, 100, 100);
}
if(c1)
{
fill(0);
rect(310, 230, 100, 100);
}
if(v1)
{
fill(0);
rect(440, 230, 100, 100);
}
//////////////////////////////////////////第二排
if (y1)
{
fill(0);
rect(50, 360, 100, 100);
}
if(u1)
{
fill(0);
rect(180, 360, 100, 100);
}
if(i1)
{
fill(0);
rect(310, 360, 100, 100);
}
if(o1)
{
fill(0);
rect(440, 360, 100, 100);
}
/////////////////////////////////////////////////////////////第三排
if (h1)
{
fill(0);
rect(50, 490, 100, 100);
}
if(j1)
{
fill(0);
rect(180, 490, 100, 100);
}
if(k1)
{
fill(0);
rect(310, 490, 100, 100);
}
if(l1)
{
fill(0);
rect(440, 490, 100, 100);
}
////////////////////////////////////////////////////////////////第四排////////////X+50.Y+80
if(sice==1)
{
fill(0,0,0,120);
rect(450, 280, 20, 60);
rect(450, 360, 20, 60);
}
if(siceten==1)
{
fill(0,0,0,120);
rect(300, 280, 20, 60);
rect(300, 360, 20, 60);
}
if(sicehun==1)
{
fill(0,0,0,120);
rect(150, 280, 20, 60);
rect(150, 360, 20, 60);
}
if(siceten==2)
{
fill(0,0,0,120);
rect(240,260,60,20);
rect(300, 280, 20, 60);
rect(240,340,60,20);
rect(220, 360, 20, 60);
rect(240,420,60,20);
}
if(sicehun==2)
{
fill(0,0,0,120);
rect(90,260,60,20);
rect(150, 280, 20, 60);
rect(90,340,60,20);
rect(70, 360, 20, 60);
rect(90,420,60,20);
}
if(sice==2)
{
fill(0,0,0,120);
rect(390,260,60,20);
rect(450, 280, 20, 60);
rect(390,340,60,20);
rect(370, 360, 20, 60);
rect(390,420,60,20);
}
if(sice==3)
{
fill(0,0,0,120);
rect(390,260,60,20);
rect(450, 280, 20, 60);
rect(390,340,60,20);
rect(450, 360, 20, 60);
rect(390,420,60,20);
}
if(siceten==3)
{
fill(0,0,0,120);
rect(240,260,60,20);
rect(300, 280, 20, 60);
rect(240,340,60,20);
rect(300, 360, 20, 60);
rect(240,420,60,20);
}
if(sicehun==3)
{
fill(0,0,0,120);
rect(90,260,60,20);
rect(150, 280, 20, 60);
rect(90,340,60,20);
rect(150, 360, 20, 60);
rect(90,420,60,20);
}
if(sice==4)
{
fill(0,0,0,120);
rect(370, 280, 20, 60);
rect(450, 280, 20, 60);
rect(390,340,60,20);
rect(450, 360, 20, 60);
}
if(siceten==4)
{
fill(0,0,0,120);
rect(220, 280, 20, 60);
rect(300, 280, 20, 60);
rect(240,340,60,20);
rect(300, 360, 20, 60);
}
if(sicehun==4)
{
fill(0,0,0,120);
rect(70, 280, 20, 60);
rect(150, 280, 20, 60);
rect(90,340,60,20);
rect(150, 360, 20, 60);
}
if(sice==5)
{
fill(0,0,0,120);
rect(390,260,60,20);
rect(370, 280, 20, 60);
rect(390,340,60,20);
rect(450, 360, 20, 60);
rect(390,420,60,20);
}
if(siceten==5)
{
fill(0,0,0,120);
rect(240,260,60,20);
rect(220, 280, 20, 60);
rect(240,340,60,20);
rect(300, 360, 20, 60);
rect(240,420,60,20);
}
if(sicehun==5)
{
fill(0,0,0,120);
rect(90,260,60,20);
rect(70, 280, 20, 60);
rect(90,340,60,20);
rect(150, 360, 20, 60);
rect(90,420,60,20);
}
if(sice==6)
{
fill(0,0,0,120);
rect(390,260,60,20);
rect(450, 280, 20, 60);
rect(390,340,60,20);
rect(450, 360, 20, 60);
rect(390,420,60,20);
rect(370, 360, 20, 60);
}
if(siceten==6)
{
fill(0,0,0,120);
rect(240,260,60,20);
rect(300, 280, 20, 60);
rect(240,340,60,20);
rect(300, 360, 20, 60);
rect(240,420,60,20);
rect(220, 360, 20, 60);
}
if(sicehun==6)
{
fill(0,0,0,120);
rect(90,260,60,20);
rect(150, 280, 20, 60);
rect(90,340,60,20);
rect(150, 360, 20, 60);
rect(90,420,60,20);
rect(70, 360, 20, 60);
}
if(sice==7)
{
fill(0,0,0,120);
rect(390,260,60,20);
rect(450, 280, 20, 60);
rect(450, 360, 20, 60);
}
if(siceten==7)
{
fill(0,0,0,120);
rect(240,260,60,20);
rect(300, 280, 20, 60);
rect(300, 360, 20, 60);
}
if(sicehun==7)
{
fill(0,0,0,120);
rect(90,260,60,20);
rect(150, 280, 20, 60);
rect(150, 360, 20, 60);
}
if(sice==8)
{
fill(0,0,0,120);
rect(390,260,60,20);
rect(450, 280, 20, 60);
rect(390,340,60,20);
rect(450, 360, 20, 60);
rect(390,420,60,20);
rect(370, 360, 20, 60);
rect(370, 280, 20, 60);
}
if(siceten==8)
{
fill(0,0,0,120);
rect(240,260,60,20);
rect(300, 280, 20, 60);
rect(240,340,60,20);
rect(300, 360, 20, 60);
rect(240,420,60,20);
rect(220, 360, 20, 60);
rect(220, 280, 20, 60);
}
if(sicehun==8)
{
fill(0,0,0,120);
rect(90,260,60,20);
rect(150, 280, 20, 60);
rect(90,340,60,20);
rect(150, 360, 20, 60);
rect(90,420,60,20);
rect(70, 360, 20, 60);
rect(70, 280, 20, 60);
}
if(sice==9)
{
fill(0,0,0,120);
rect(390,260,60,20);
rect(450, 280, 20, 60);
rect(390,340,60,20);
rect(450, 360, 20, 60);
rect(390,420,60,20);
// rect(320, 280, 20, 60);
rect(370, 280, 20, 60);
}
if(siceten==9)
{
fill(0,0,0,120);
rect(240,260,60,20);
rect(300, 280, 20, 60);
rect(240,340,60,20);
rect(300, 360, 20, 60);
rect(240,420,60,20);
// rect(320, 280, 20, 60);
rect(220, 280, 20, 60);
}
if(sicehun==9)
{
fill(0,0,0,120);
rect(90,260,60,20);
rect(150, 280, 20, 60);
rect(90,340,60,20);
rect(150, 360, 20, 60);
rect(90,420,60,20);
// rect(320, 280, 20, 60);
rect(70, 280, 20, 60);
}
if(sice==0)
{
fill(0,0,0,120);
rect(390,260,60,20);
rect(450, 280, 20, 60);
// rect(390,340,60,20);
rect(450, 360, 20, 60);
rect(390,420,60,20);
rect(370, 360, 20, 60);
rect(370, 280, 20, 60);
}
if(siceten==0)
{
fill(0,0,0,120);
rect(240,260,60,20);
rect(300, 280, 20, 60);
// rect(390,340,60,20);
rect(300, 360, 20, 60);
rect(240,420,60,20);
rect(220, 360, 20, 60);
rect(220, 280, 20, 60);
}
if(sicehun==0)
{
fill(0,0,0,120);
rect(90,260,60,20);
rect(150, 280, 20, 60);
// rect(390,340,60,20);
rect(150, 360, 20, 60);
rect(90,420,60,20);
rect(70, 360, 20, 60);
rect(70, 280, 20, 60);
}
}
void keyPressed(){
if(key=='a'|| key == 'A'){
a12=true;
}
else if(key=='s'|| key == 'S'){
s12=true;
}
else if(key=='d'|| key == 'D')
{
d12=true;
}
else if(key=='f'|| key == 'F')
{
f12=true;
}
if(key=='z'|| key == 'Z'){
z12=true;
}
else if(key=='x'|| key == 'X'){
x12=true;
}
else if(key=='c'|| key == 'C')
{
c12=true;
}
else if(key=='v'|| key == 'V')
{
v12=true;
}
if(key=='y'|| key == 'Y'){
y12=true;
}
else if(key=='u'|| key == 'U'){
u12=true;
}
else if(key=='i'|| key == 'I')
{
i12=true;
}
else if(key=='o'|| key == 'O')
{
o12=true;
}
if(key=='h'|| key == 'H'){
h12=true;
}
else if(key=='j'|| key == 'J'){
j12=true;
}
else if(key=='k'|| key == 'K')
{
k12=true;
}
else if(key=='l'|| key == 'L')
{
l12=true;
}
else if(key=='q'|| key == 'Q')/////////////////////////////////開始建
{
q12=true;
}
}
void keyReleased(){
if(key=='a'|| key == 'A')
{
a12=false;
}
if(key=='s'|| key == 'S'){
s12=false;
s123=3;
}
if(key=='d'|| key == 'D')
{
d12=false;
}
else if(key=='f'|| key == 'F')
{
f12=false;
}
else if(key=='z'|| key == 'Z')
{
z12=false;
}
if(key=='x'|| key == 'X'){
x12=false;
}
if(key=='c'|| key == 'C')
{
c12=false;
}
else if(key=='v'|| key == 'V')
{
v12=false;
}
if(key=='y'|| key == 'Y'){
y12=false;
}
else if(key=='u'|| key == 'U'){
u12=false;
}
else if(key=='i'|| key == 'I')
{
i12=false;
}
else if(key=='o'|| key == 'O')
{
o12=false;
}
if(key=='h'|| key == 'H'){
h12=false;
}
else if(key=='j'|| key == 'J'){
j12=false;
}
else if(key=='k'|| key == 'K')
{
k12=false;
}
else if(key=='l'|| key == 'L')
{
l12=false;
}
else if(key=='q'|| key == 'Q')/////////////////////////開始建
{
q12=false;
}
}