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

📄 sevenyearitch$gamecanvas.java

📁 一款类似于扔砖头的游戏
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
        }
        else if (this.this$0.lev == 5)
        {
          this.this$0.timerO += 1;
          if (this.this$0.timerO % 20 == 0)
          {
            SevenYearItch.access$002(this.this$0, new Random());
            this.this$0.hran = (SevenYearItch.access$000(this.this$0).nextInt() % 50);
            if (this.this$0.hran < 0)
              this.this$0.hran *= -1;
            if ((this.this$0.hran <= 20) && (this.this$0.hran >= 0))
              this.this$0.hran += 20;
            else if ((this.this$0.hran >= 80) && (this.this$0.hran <= 128))
              this.this$0.hran -= 20;
            this.this$0.go_matchopp = 1;
            this.this$0.opp_anim = 1;
          }
          if (this.this$0.timerO == 200)
            this.this$0.timerO = 0;
        }
        if (this.this$0.opp_thro == 1)
        {
          this.this$0.go_matchopp = 0;
          this.this$0.tar_anim = 2;
          this.this$0.index_x = 0;
          this.this$0.index_y = 0;
          this.this$0.index_x = ((this.this$0.opp_x + 14 - this.this$0.user_x + 50) / 8);
          if (this.this$0.index_x < 0)
          {
            this.this$0.index_x *= -1;
            this.this$0.oppx1 = this.this$0.index_x;
            this.this$0.oppx2 = (2 * this.this$0.index_x);
            this.this$0.oppx3 = (3 * this.this$0.index_x);
            this.this$0.oppx4 = (4 * this.this$0.index_x);
            this.this$0.oppx5 = (5 * this.this$0.index_x);
            this.this$0.oppx6 = (6 * this.this$0.index_x);
            this.this$0.oppx7 = (7 * this.this$0.index_x);
            this.this$0.oppx8 = (8 * this.this$0.index_x);
          }
          else if (this.this$0.index_x >= 0)
          {
            this.this$0.index_x *= -1;
            this.this$0.oppx1 = this.this$0.index_x;
            this.this$0.oppx2 = (2 * this.this$0.index_x);
            this.this$0.oppx3 = (3 * this.this$0.index_x);
            this.this$0.oppx4 = (4 * this.this$0.index_x);
            this.this$0.oppx5 = (5 * this.this$0.index_x);
            this.this$0.oppx6 = (6 * this.this$0.index_x);
            this.this$0.oppx7 = (7 * this.this$0.index_x);
            this.this$0.oppx8 = (8 * this.this$0.index_x);
          }
          this.this$0.index_y = ((this.this$0.user_y + 20 - this.this$0.opp_y) / 8);
          this.this$0.oppy1 = this.this$0.index_y;
          this.this$0.oppy2 = (2 * this.this$0.index_y);
          this.this$0.oppy3 = (3 * this.this$0.index_y);
          this.this$0.oppy4 = (4 * this.this$0.index_y);
          this.this$0.oppy5 = (5 * this.this$0.index_y);
          this.this$0.oppy6 = (6 * this.this$0.index_y);
          this.this$0.oppy7 = (7 * this.this$0.index_y);
          this.this$0.oppy8 = (8 * this.this$0.index_y);
          this.this$0.oppth += 1;
          if (this.this$0.oppth < 2)
            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.oppth >= 2) && (this.this$0.oppth < 4))
            paramGraphics.drawImage(this.this$0.choose[this.this$0.opponent][1], this.this$0.opp_x, this.this$0.opp_y, 20);
          if ((this.this$0.oppth >= 4) && (this.this$0.oppth < 6))
            paramGraphics.drawImage(this.this$0.choose[this.this$0.opponent][2], this.this$0.opp_x, this.this$0.opp_y, 20);
          if ((this.this$0.oppth >= 6) && (this.this$0.oppth < 7))
          {
            paramGraphics.drawImage(this.this$0.choose[this.this$0.opponent][3], this.this$0.opp_x, this.this$0.opp_y, 20);
            paramGraphics.drawImage(this.this$0.choose[this.this$0.opponent][4], this.this$0.opp_x, this.this$0.opp_y, 20);
          }
          if ((this.this$0.oppth > 0) && (this.this$0.oppth < 7))
            this.this$0.opp_anim = 0;
          else if ((this.this$0.oppth >= 7) && (this.this$0.oppth < 17))
            this.this$0.opp_anim = 1;
          this.this$0.oppcnt += 1;
          if (this.this$0.oppcnt == 6)
            paramGraphics.drawImage(this.this$0.img[this.this$0.vesso][3], this.this$0.opp_x + this.this$0.oppx1, this.this$0.opp_y + this.this$0.oppy1, 20);
          if ((this.this$0.oppcnt > 6) && (this.this$0.oppcnt < 8))
            paramGraphics.drawImage(this.this$0.img[this.this$0.vesso][3], this.this$0.opp_x + this.this$0.oppx2, this.this$0.opp_y + this.this$0.oppy2, 20);
          if ((this.this$0.oppcnt >= 8) && (this.this$0.oppcnt < 10))
            paramGraphics.drawImage(this.this$0.img[this.this$0.vesso][2], this.this$0.opp_x + this.this$0.oppx3, this.this$0.opp_y + this.this$0.oppy3, 20);
          if ((this.this$0.oppcnt >= 10) && (this.this$0.oppcnt < 12))
            paramGraphics.drawImage(this.this$0.img[this.this$0.vesso][2], this.this$0.opp_x + this.this$0.oppx4, this.this$0.opp_y + this.this$0.oppy4, 20);
          if ((this.this$0.oppcnt >= 12) && (this.this$0.oppcnt < 14))
            paramGraphics.drawImage(this.this$0.img[this.this$0.vesso][1], this.this$0.opp_x + this.this$0.oppx5, this.this$0.opp_y + this.this$0.oppy5, 20);
          if ((this.this$0.oppcnt >= 14) && (this.this$0.oppcnt < 16))
            paramGraphics.drawImage(this.this$0.img[this.this$0.vesso][1], this.this$0.opp_x + this.this$0.oppx6, this.this$0.opp_y + this.this$0.oppy6, 20);
          if ((this.this$0.oppcnt >= 16) && (this.this$0.oppcnt < 18))
            paramGraphics.drawImage(this.this$0.img[this.this$0.vesso][0], this.this$0.opp_x + this.this$0.oppx7, this.this$0.opp_y + this.this$0.oppy7, 20);
          if ((this.this$0.oppcnt >= 18) && (this.this$0.oppcnt < 20))
            paramGraphics.drawImage(this.this$0.img[this.this$0.vesso][0], this.this$0.opp_x + this.this$0.oppx8, this.this$0.opp_y + this.this$0.oppy8, 20);
          if (this.this$0.oppth == 19)
          {
            this.this$0.vesso += 1;
            paramGraphics.drawImage(this.this$0.choose[this.this$0.opponent][0], this.this$0.opp_x, this.this$0.opp_y, 20);
            this.this$0.oppth = 0;
            this.this$0.oppcnt = 0;
            this.this$0.fire = 0;
            this.this$0.opp_anim = 1;
            this.this$0.rand_g = 1;
            this.this$0.opp_thro = 0;
          }
        }
        else
        {
          this.this$0.oppth = 0;
          this.this$0.oppcnt = 0;
          this.this$0.opp_thro = 0;
          this.this$0.opp_anim = 1;
          this.this$0.rand_g = 0;
        }
        if ((this.this$0.oppcnt == 18) && (this.this$0.down != 1) && (((this.this$0.hit == 1) || (this.this$0.hit == 2) || (this.this$0.hit == 3) || (this.this$0.hit == 0))))
        {
          this.this$0.lives -= 1;
          this.this$0.index_x = 0;
          this.this$0.index_y = 0;
          this.this$0.user_anim = 0;
          this.this$0.user_blink = 1;
          if (this.this$0.sound == 0)
          {
            this.this$0.sc.stop();
            this.this$0.hurt.play(1);
          }
          if (this.this$0.lives <= 0)
            this.this$0.End();
        }
        if (this.this$0.user_anim == 1)
        {
          this.this$0.abb = 0;
          if ((this.this$0.kpuser_movesR == 1) && (this.this$0.animflag == 0))
          {
            this.this$0.user_x += 2;
            if (this.this$0.user_x > 51)
              this.this$0.user_x = 51;
          }
          else if ((this.this$0.kpuser_movesR == 0) && (this.this$0.animflag == 0))
          {
            this.this$0.user_x -= 2;
            if (this.this$0.user_x < -33)
              this.this$0.user_x = -33;
          }
          if ((this.this$0.down == 0) && (this.this$0.hit == 0))
            paramGraphics.drawImage(this.this$0.choose[this.this$0.user][0], this.this$0.user_x, this.this$0.user_y, 20);
          else if ((this.this$0.down == 1) && (this.this$0.hit == 0))
            paramGraphics.drawImage(this.this$0.choose[this.this$0.user][1], this.this$0.user_x, this.this$0.user_y, 20);
          else if ((this.this$0.down == 1) && (((this.this$0.hit == 1) || (this.this$0.hit == 2))))
            paramGraphics.drawImage(this.this$0.choose[this.this$0.user][1], this.this$0.user_x, this.this$0.user_y, 20);
          else if ((this.this$0.hit == 2) && (this.this$0.down == 0) && (this.this$0.userth < 4))
            paramGraphics.drawImage(this.this$0.choose[this.this$0.user][0], 400, 400, 20);
          else if ((this.this$0.hit == 2) && (this.this$0.down == 0) && (this.this$0.userth >= 4) && (this.this$0.userth <= 17))
            paramGraphics.drawImage(this.this$0.choose[this.this$0.user][0], this.this$0.user_x, this.this$0.user_y, 20);
        }
        else if (this.this$0.user_anim == 0)
        {
          paramGraphics.drawImage(this.this$0.choose[this.this$0.user][0], 400, 400, 20);
          paramGraphics.drawImage(this.this$0.choose[this.this$0.user][2], 400, 400, 20);
          paramGraphics.drawImage(this.this$0.img[this.this$0.vessu][0], 400, 400, 20);
        }
        else if (this.this$0.user_anim == 2)
        {
          paramGraphics.drawImage(this.this$0.choose[this.this$0.user][0], 200, 200, 20);
        }
        if (this.this$0.vesso == 4)
          this.this$0.vesso = 0;
        if (this.this$0.hit == 1)
        {
          this.this$0.animflag = 0;
          this.this$0.variable = 1;
          this.this$0.user_anim = 1;
          this.this$0.tar_anim = 1;
          this.this$0.dncounter += 1;
          if (this.this$0.dncounter < 4)
          {
            this.this$0.down = 1;
            this.this$0.user_anim = 0;
          }
          else if (this.this$0.dncounter == 4)
          {
            this.this$0.down = 0;
            this.this$0.user_anim = 1;
          }
          if (this.this$0.user_blink != 1)
          {
            if (this.this$0.user == 1)
              if ((this.this$0.vessu == 0) && (this.this$0.down == 0))
              {
                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 + 41, this.this$0.user_y, 20);
              }
              else if ((this.this$0.vessu == 1) && (this.this$0.down == 0))
              {
                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 + 53, this.this$0.user_y - 2, 20);
              }
              else if ((this.this$0.vessu == 2) && (this.this$0.down == 0))
              {
                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 + 49, this.this$0.user_y - 1, 20);
              }
              else if ((this.this$0.vessu == 3) && (this.this$0.down == 0))
              {
                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 + 39, this.this$0.user_y - 10, 20);
              }
            else if (this.this$0.user == 0)
              if ((this.this$0.vessu == 0) && (this.this$0.down == 0))
              {
                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 + 43, this.this$0.user_y - 1, 20);
              }
              else if ((this.this$0.vessu == 1) && (this.this$0.down == 0))
              {
                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 + 53, this.this$0.user_y - 2, 20);
              }
              else if ((this.this$0.vessu == 2) && (this.this$0.down == 0))
              {
                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 + 53, this.this$0.user_y - 1, 20);
              }
              else if ((this.this$0.vessu == 3) && (this.this$0.down == 0))
              {
                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.vessu == 0) && (this.this$0.down == 1))
              paramGraphics.drawImage(this.this$0.choose[this.this$0.user][1], this.this$0.user_x, this.this$0.user_y, 20);
            else if ((this.this$0.vessu == 1) && (this.this$0.down == 1))
              paramGraphics.drawImage(this.this$0.choose[this.this$0.user][1], this.this$0.user_x, this.this$0.user_y, 20);
            else if ((this.this$0.vessu == 2) && (this.this$0.down == 1))
              paramGraphics.drawImage(this.this$0.choose[this.this$0.user][1], this.this$0.user_x, this.this$0.user_y, 20);
            else if ((this.this$0.vessu == 3) && (this.this$0.down == 1))
              paramGraphics.drawImage(this.this$0.choose[this.this$0.user][1], this.this$0.user_x, this.this$0.user_y, 20);
          }
        }
        else if (this.this$0.hit == 2)
        {
          this.this$0.animflag = 1;
          if (this.this$0.animflag == 1)
          {
            this.this$0.temposx = this.this$0.user_x;
            this.this$0.temposy = this.this$0.user_y;
          }
          this.this$0.variable = 0;
          this.this$0.dncounter = 0;
          this.this$0.tar_anim = 0;
          this.this$0.userth += 1;
          this.this$0.index_user_x = 0;
          this.this$0.index_user_y = 0;
          this.this$0.index_user_x = ((this.this$0.posx + 7 - this.this$0.temposx + 56) / 8);
          this.this$0.usrx1 = (this.this$0.index_user_x - 28);
          this.this$0.usrx2 = (2 * this.this$0.index_user_x - 28);
          this.this$0.usrx3 = (3 * this.this$0.index_user_x - 28);
          this.this$0.usrx4 = (4 * this.this$0.index_user_x - 28);
          this.this$0.usrx5 = (5 * this.this$0.index_user_x - 28);
          this.this$0.usrx6 = (6 * this.this$0.index_user_x - 28);
          this.this$0.usrx7 = (7 * this.this$0.index_user_x - 28);
          this.this$0.usrx8 = (8 * this.this$0.index_user_x - 28);
          this.this$0.index_user_y = ((this.this$0.temposy + 38 - this.this$0.posy + 7) / 8);
          this.this$0.usry1 = (this.this$0.index_user_y - 23);
          this.this$0.usry2 = (2 * this.this$0.index_user_y - 23);
          this.this$0.usry3 = (3 * this.this$0.index_user_y - 23);
          this.this$0.usry4 = (4 * this.this$0.index_user_y - 23);

⌨️ 快捷键说明

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