📄 screen.java
字号:
break;
case Screen.Hard:
if( (d1.data[balldown[0][0]][1]-step)<=97 )
{
flag=true;
speed=1;
}
else
speed=2;
break;
}
if( flag )
{
message=2;
messagetime=0;
Numcombo=0;
score+=2000;
Numgoods++;
}
else
{
if(Numcombo==0)
message=3;
else
message=4;
messagetime=0;
Numcombo++;
Numgreats++;
if(Numcombo<10)
score+=Numcombo*3000;
else
score+=5000;
}
int temp=d1.data[balldown[0][0]][0]/38;
dieturn[temp][0]=1;
if(Random(10)<5)
{
dieturn[temp][1]=1;
dieturn[temp][2]=3;
}
else
{
dieturn[temp][1]=0;
dieturn[temp][2]=0;
}
if( speed>0 )
{
isaddballup=true;
addball(1,speed);
Updataballdown();
}
else
{
addballdown(1);
}
}
if( ball[0]>=0 &&
d1.data[ball[0]][2]==k &&
(d1.data[ball[0]][1]-step)>(111-28) &&
(d1.data[ball[0]][1]-step)<=111 )
{
boolean flag=false;
byte speed=0;
//byte speed=1;
switch(level)
{
case Screen.Easy:
if( (d1.data[ball[0]][1]-step)<=90 )
flag=true;
else if( (d1.data[ball[0]][1]-step)<=97 )
{
flag=true;
speed=1;
}
else
speed=2;
break;
case Screen.Normal:
if( (d1.data[ball[0]][1]-step)<=91 )
flag=true;
else if( (d1.data[ball[0]][1]-step)<=101 )
{
flag=true;
speed=1;
}
else
speed=2;
break;
case Screen.Hard:
if( (d1.data[ball[0]][1]-step)<=97 )
{
flag=true;
speed=1;
}
else
speed=2;
break;
}
if( flag )
{
message=2;
messagetime=0;
Numcombo=0;
score+=2000;
Numgoods++;
}
else
{
if(Numcombo==0)
message=3;
else
message=4;
messagetime=0;
Numcombo++;
Numgreats++;
if(Numcombo<10)
score+=Numcombo*3000;
else
score+=5000;
}
int temp=d1.data[ball[0]][0]/38;
dieturn[temp][0]=1;
if(Random(10)<5)
{
dieturn[temp][1]=1;
dieturn[temp][2]=3;
}
else
{
dieturn[temp][1]=0;
dieturn[temp][2]=0;
}
if( speed>0 )
isaddballup=true;
else
addballdown(0);
addball(0,speed);
}
}
void Init1()
{
WD = 176;
HI = 204;
score = 0;
gamestate = 0;
gametime = 0;
key = -1;
message = 0;
messagetime = 0;
menuselect = 0;
color = 0;
gamepause = false;
isover = 0;
ispassed = false;
timexx = 0;
flagstar = true;
starnum = 0;
fenmu = 0;
goodx = 0;
lossx = 0;
greatx = 0;
Numlossed = 0;
Numgoods = 0;
Numgreats = 0;
Numcombo = 0;
clock = 0;
isaddball = true;
isaddballup = false;
dieturn = null;
dieturn = new byte[4][3];
for(int i=0;i<6;i++)
{
ball[i] = i;
ballup[i][0] = -1;
ballup[i][1] = 0;
balldown[i][0] = -1;
balldown[i][1] = 0;
}
}
void Init2()
{
switch(level)
{
case 1:
lifeball1=5;
lifeball2=5;
step = 7;
break;
case 2:
lifeball1=4;
lifeball2=4;
step = 10;
break;
case 3:
lifeball1=3;
lifeball2=3;
step = 14;
break;
}
d1.Init1(level);
}
/*
public void commandAction(Command cc, Displayable displayable)
{
switch(gamestate)
{
case COVER2:
if(cc==OK)
{
RemoveAllCommand();
switch(menuselect)
{
case 0: //selectlevel
gamestate=SELECTLEVEL;
addCommand(OK);
addCommand(BACK);
break;
case 1: //setting
gamestate=SETTING;
addCommand(UPDATE);
addCommand(BACK);
break;
case 2: //TOP10
color=0;
gamestate=TOP10;
addCommand(BACK);
break;
case 3: //help
gamestate=INSTRUCTIONS;
Display.getDisplay(DJ.instance).setCurrent(new InstructionsScreen(this));
break;
case 4: //about
gamestate=ABOUT;
Display.getDisplay(DJ.instance).setCurrent(new AboutScreen(this));
break;
}
}
else if(cc==EXIT)
{
DJ.quitApp();
}
break;
case SELECTLEVEL:
if(cc==BACK)
{
gamestate=COVER2;
RemoveAllCommand();
addCommand(OK);
addCommand(EXIT);
}
else if(cc==OK)
{
setStart();
}
break;
case SETTING:
if(cc==UPDATE)
{
soundselect=(soundselect==1)?0:(byte)1;
try
{
WriteRecord2();
}
catch( Exception e )
{
soundselect=(soundselect==1)?0:(byte)1;
e.printStackTrace();
}
}
else if(cc==BACK)
{
gamestate=COVER2;
RemoveAllCommand();
addCommand(OK);
addCommand(EXIT);
}
break;
case TOP10:
gamestate=COVER2;
RemoveAllCommand();
addCommand(OK);
addCommand(EXIT);
break;
case GAMING:
if(cc==BACK)
{
if(soundselect==1)
activeBKSound(3);
gamepause=false;
gamestate=COVER2;
RemoveAllCommand();
addCommand(OK);
addCommand(EXIT);
}
else if(cc==PAUSE)
{
if(!gamepause && isover==0)
{
if(soundselect==1)
activeBKSound(3);
gamepause=true;
RemoveAllCommand();
addCommand(ReTry);
addCommand(BACK);
}
}
else if(cc==ReTry)
{
if(gamepause)
{
setStart();
}
}
break;
case GAMERESULT:
if(cc==BACK)
{
gamestate=COVER2;
RemoveAllCommand();
addCommand(OK);
addCommand(EXIT);
}
else if(cc==ReTry)
{
if(level==3)
{
gamestate=SELECTLEVEL;
RemoveAllCommand();
addCommand(OK);
addCommand(BACK);
}
else
{
setStart();
}
}
else if(cc==Next)
{
Init1();
level=GetLevel;
Init2();
gamestate=GAMING;
RemoveAllCommand();
addCommand(PAUSE);
addCommand(BACK);
if(soundselect==1)
activeBKSound(0);
}
break;
}
}
*/
int kkk1=-7;//21; //wolf
int kkk2=-6;//22; //wolf
public void ConnURL()//连接下载KK
{
try
{
//boolean flag =platformRequest("http://wap.monternet.com");//测试用
//wolf boolean flag =dj.platformRequest("http://219.232.53.134/tianben/DJball.asp");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -