📄 sevenyearitch$gamecanvas.java
字号:
this.this$0.points += 10;
this.this$0.shots += 1;
if (this.this$0.sound == 0)
{
this.this$0.hurt.stop();
this.this$0.sc.play(1);
}
}
if (this.this$0.opp_blink == 1)
{
this.this$0.opp_anim = 0;
this.this$0.bbb += 1;
if (this.this$0.bbb % 4 == 0)
paramGraphics.drawImage(this.this$0.choose[this.this$0.opponent][0], 200, 200, 20);
else
paramGraphics.drawImage(this.this$0.choose[this.this$0.opponent][0], this.this$0.opp_x, this.this$0.opp_y, 20);
if (this.this$0.bbb == 8)
{
this.this$0.opp_anim = 1;
this.this$0.opp_blink = 0;
}
}
if (this.this$0.sel == 0)
paramGraphics.setColor(16773135);
else if (this.this$0.sel == 1)
paramGraphics.setColor(16715535);
for (int i = 0; i < this.this$0.lives; ++i)
paramGraphics.fillRect(90 + i * 7, 120, 5, 5);
if (this.this$0.sel == 0)
paramGraphics.setColor(0);
else if (this.this$0.sel == 1)
paramGraphics.setColor(0);
paramGraphics.setFont(Font.getFont(0, 1, 8));
paramGraphics.drawString("Score: " + this.this$0.points, 2, this.this$0.h - 10, 20);
paramGraphics.setColor(16777215);
paramGraphics.setFont(Font.getFont(0, 1, 8));
paramGraphics.drawString("Score: " + this.this$0.points, 3, this.this$0.h - 9, 20);
if ((this.this$0.lev == 1) && (this.this$0.rem > 0) && (this.this$0.shots == 7))
{
this.this$0.tri = 0;
this.this$0.lev = 2;
this.this$0.rem = 11;
this.this$0.opp_anim = 1;
this.this$0.user_anim = 1;
this.this$0.shots = 0;
this.this$0.fircount = 0;
}
else if ((this.this$0.lev == 1) && (this.this$0.rem == 0) && (this.this$0.shots < 7))
{
this.this$0.End();
}
if ((this.this$0.lev == 2) && (this.this$0.rem > 0) && (this.this$0.shots == 7))
{
this.this$0.tri = 0;
this.this$0.lev = 3;
this.this$0.rem = 10;
this.this$0.opp_anim = 1;
this.this$0.user_anim = 1;
this.this$0.shots = 0;
this.this$0.fircount = 0;
}
else if ((this.this$0.lev == 2) && (this.this$0.rem == 0) && (this.this$0.shots < 7))
{
this.this$0.End();
}
if ((this.this$0.lev == 3) && (this.this$0.rem > 0) && (this.this$0.shots == 7))
{
this.this$0.tri = 0;
this.this$0.lev = 4;
this.this$0.rem = 9;
this.this$0.opp_anim = 1;
this.this$0.user_anim = 1;
this.this$0.shots = 0;
this.this$0.fircount = 0;
}
else if ((this.this$0.lev == 3) && (this.this$0.rem == 0) && (this.this$0.shots < 7))
{
this.this$0.End();
}
if ((this.this$0.lev == 4) && (this.this$0.rem > 0) && (this.this$0.shots == 7))
{
this.this$0.tri = 0;
this.this$0.lev = 5;
this.this$0.rem = 8;
this.this$0.opp_anim = 1;
this.this$0.user_anim = 1;
this.this$0.shots = 0;
this.this$0.fircount = 0;
}
else if ((this.this$0.lev == 4) && (this.this$0.rem == 0) && (this.this$0.shots < 7))
{
this.this$0.End();
}
if ((this.this$0.lev == 5) && (this.this$0.rem > 0) && (this.this$0.shots == 7))
this.this$0.End();
else if ((this.this$0.lev == 5) && (this.this$0.rem == 0) && (this.this$0.shots < 7))
this.this$0.End();
if ((this.this$0.lev == 1) || (this.this$0.lev == 2) || (this.this$0.lev == 3) || (this.this$0.lev == 4) || (this.this$0.lev == 5) || (this.this$0.lev == 6))
{
this.this$0.tri += 1;
if ((this.this$0.tri < 30) && (this.this$0.tri % 8 != 0))
{
paramGraphics.setColor(0);
paramGraphics.setFont(Font.getFont(0, 1, 16));
paramGraphics.drawString("ROUND: " + this.this$0.lev, 20, 55, 20);
paramGraphics.setColor(16777215);
paramGraphics.setFont(Font.getFont(0, 1, 16));
paramGraphics.drawString("ROUND: " + this.this$0.lev, 21, 56, 20);
}
}
}
this.this$0.gamePaint += 1;
if (this.this$0.gamePaint >= 2)
this.this$0.gamePaint = 2;
}
else
{
paramGraphics.setFont(Font.getFont(0, 1, 0));
paramGraphics.setColor(255, 255, 255);
paramGraphics.fillRect(0, this.this$0.h / 2 - 10, this.this$0.w, 20);
paramGraphics.setColor(0, 0, 0);
paramGraphics.drawString("PAUSED", this.this$0.w / 2, this.this$0.h / 2 - 5, 17);
}
}
public void keyPressed()
{
switch (getGameAction(paramInt))
{
case 1:
if (this.this$0.checkPause)
return;
break;
case 5:
if (this.this$0.checkPause)
return;
if (this.this$0.start == 0)
{
if (this.this$0.sel == 1)
{
this.this$0.sel = 0;
return;
}
if (this.this$0.sel != 0)
return;
this.this$0.sel = 1;
return;
}
this.this$0.kpuser_movesR = 1;
break;
case 2:
if (this.this$0.checkPause)
return;
if (this.this$0.start == 0)
{
if (this.this$0.sel == 1)
{
this.this$0.sel = 0;
return;
}
if (this.this$0.sel != 0)
return;
this.this$0.sel = 1;
return;
}
this.this$0.kpuser_movesR = 0;
break;
case 6:
if (this.this$0.checkPause)
break label255;
if (this.this$0.start == 0)
return;
this.this$0.down = 1;
this.this$0.dn_load = 1;
break;
case 8:
if (this.this$0.checkPause)
return;
if (this.this$0.start == 0)
{
if (this.this$0.sel == 0)
{
this.this$0.UserWoman();
this.this$0.start = 1;
this.this$0.user = 1;
this.this$0.opponent = 3;
return;
}
if (this.this$0.sel != 1)
return;
this.this$0.UserMan();
this.this$0.start = 1;
this.this$0.user = 0;
this.this$0.opponent = 2;
return;
}
this.this$0.fire = 1;
if ((this.this$0.turn != 1) || (this.this$0.userth != 0) || (this.this$0.user_blink == 1))
return;
if (this.this$0.hit > 2)
this.this$0.hit = 0;
this.this$0.hit += 1;
break;
case 3:
case 4:
case 7:
default:
if ((paramInt == -6) && (!(this.this$0.checkPause)))
{
label255: this.this$0.gamePaint = 0;
this.this$0.a = 2;
this.this$0.display.setCurrent(this.this$0.intro);
}
if (paramInt != -7)
return;
this.this$0.checkPause = (this.this$0.checkPause != true);
repaint();
}
}
public void keyReleased()
{
switch (getGameAction(paramInt))
{
case 1:
if (this.this$0.checkPause)
return;
break;
case 5:
if (this.this$0.checkPause)
return;
this.this$0.kpuser_movesR = 2;
break;
case 2:
if (this.this$0.checkPause)
return;
this.this$0.kpuser_movesR = 2;
break;
case 8:
if (this.this$0.checkPause)
return;
this.this$0.fire = 0;
break;
case 6:
if (this.this$0.checkPause)
return;
this.this$0.down = 0;
this.this$0.dn_load = 0;
case 3:
case 4:
case 7:
}
}
public void scroll()
{
if ((!(this.this$0.obj.isShown())) && (this.this$0.gamePaint == 2))
this.this$0.checkPause = true;
else
repaint();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -