⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sevenyearitch.java

📁 一款类似于扔砖头的游戏
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
                  }
                  else if (this.this$0.vessu == 3)
                  {
                    paramGraphics.drawImage(this.this$0.choose[this.this$0.user][2], this.this$0.user_x, this.this$0.user_y, 20);
                    paramGraphics.drawImage(this.this$0.img[this.this$0.vessu][0], this.this$0.user_x + 44, this.this$0.user_y - 16, 20);
                  }
                if (this.this$0.abb == 8)
                {
                  this.this$0.user_anim = 1;
                  this.this$0.user_blink = 0;
                }
              }
          if ((this.this$0.usercnt == 10) && (this.this$0.posx + 2 >= this.this$0.opp_x + 10) && (this.this$0.posx + 2 <= this.this$0.opp_x + 30))
          {
            this.this$0.opp_blink = 1;
            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();
    }
  }

  public class Gameover extends FullCanvas
  {
    private final SevenYearItch this$0;

    public Gameover()
    {
      this.this$0 = paramSevenYearItch;
      if (paramSevenYearItch.sound == 0)
      {
        paramSevenYearItch.hurt.stop();
        paramSevenYearItch.sc.stop();
        paramSevenYearItch.overs.play(1);
      }
      paramSevenYearItch.a = 15;
      paramSevenYearItch.gamePaint = 0;
      paramSevenYearItch.gameend = 1;
      paramSevenYearItch.game = 0;
      paramSevenYearItch.bg = null;
      try
      {
        paramSevenYearItch.imggameover = Image.createImage("/gameover.png");
      }
      catch (Exception localException)
      {
      }
    }

    public void paint()
    {
      if ((this.this$0.highscorecheck == true) && (this.this$0.points / 10 > this.this$0.HighScoreDisplayDB()))
      {
        this.this$0.highscoretext = this.this$0.HighScore(this.this$0.points / 10);
        this.this$0.highscorecheck = false;
      }
      paramGraphics.setColor(0, 0, 0);
      paramGraphics.fillRect(0, 0, this.this$0.w, this.this$0.h);
      if (this.this$0.imggameover != null)
        paramGraphics.drawImage(this.this$0.imggameover, 0, -2, 20);
      if (this.this$0.lev < 5)
      {
        paramGraphics.setColor(16763904);
        paramGraphics.setFont(Font.getFont(0, 0, 8));
        if (this.this$0.rem > 0)
        {
          paramGraphics.drawString("Bruised and battered,", this.this$0.w / 2, 88, 17);
          paramGraphics.drawString("you give up after a", this.this$0.w / 2, 98, 17);
          paramGraphics.drawString("tough fight.", this.this$0.w / 2, 108, 17);
          paramGraphics.drawString("Score: " + this.this$0.points, this.this$0.w / 2, 117, 17);
        }
        else if (this.this$0.rem == 0)
        {
          paramGraphics.drawString("Oops! You’ve run out of", this.this$0.w / 2, 88, 17);
          paramGraphics.drawString("dishes. Use them wisely", this.this$0.w / 2, 98, 17

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -