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

📄 sevenyearitch.java

📁 一款类似于扔砖头的游戏
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
    {
      localRecordStore = RecordStore.openRecordStore("Test", true);
      try
      {
        arrayOfByte1 = localRecordStore.getRecord(1);
      }
      catch (InvalidRecordIDException localInvalidRecordIDException)
      {
        arrayOfByte1[0] = 0;
      }
      localRecordStore.closeRecordStore();
      localRecordStore = null;
      RecordStore.deleteRecordStore("Test");
      localRecordStore = RecordStore.openRecordStore("Test", true);
      byte[] arrayOfByte2 = new byte[1];
      arrayOfByte2[0] = (byte)paramInt;
      localRecordStore.addRecord(arrayOfByte2, 0, arrayOfByte2.length);
      localRecordStore.closeRecordStore();
    }
    catch (RecordStoreException localRecordStoreException)
    {
    }
    return true;
  }

  public byte HighScoreDisplayDB()
  {
    RecordStore localRecordStore = null;
    byte[] arrayOfByte = new byte[1];
    try
    {
      localRecordStore = RecordStore.openRecordStore("Test", true);
      try
      {
        arrayOfByte = localRecordStore.getRecord(1);
        localRecordStore.closeRecordStore();
        localRecordStore = null;
        return arrayOfByte[0];
      }
      catch (InvalidRecordIDException localInvalidRecordIDException)
      {
        arrayOfByte[0] = 0;
        localRecordStore.closeRecordStore();
        localRecordStore = null;
        return 0;
      }
    }
    catch (RecordStoreException localRecordStoreException)
    {
    }
    return 0;
  }

  public void UserMan()
  {
    try
    {
      this.choose[0][0] = Image.createImage("/m1.png");
      this.choose[0][1] = Image.createImage("/m2.png");
      this.choose[0][2] = Image.createImage("/m3.png");
      this.choose[0][3] = Image.createImage("/m4.png");
      this.choose[0][4] = Image.createImage("/m5.png");
      this.choose[2][1] = Image.createImage("/w2.png");
      this.choose[2][2] = Image.createImage("/w3.png");
      this.choose[2][3] = Image.createImage("/w4.png");
      this.choose[2][4] = Image.createImage("/w5.png");
    }
    catch (Exception localException)
    {
    }
  }

  public void Menubg(Graphics paramGraphics)
  {
    paramGraphics.setColor(16711680);
    paramGraphics.fillRect(0, 0, this.w, this.h);
    paramGraphics.setColor(16747008);
    paramGraphics.fillRoundRect(13, 25, this.w, this.h, 30, 30);
    paramGraphics.setColor(7471104);
    paramGraphics.fillRoundRect(16, 28, this.w, this.h, 30, 30);
  }

  public void UserWoman()
  {
    try
    {
      this.choose[1][0] = Image.createImage("/x1.png");
      this.choose[1][1] = Image.createImage("/x2.png");
      this.choose[1][2] = Image.createImage("/x3.png");
      this.choose[1][3] = Image.createImage("/x4.png");
      this.choose[1][4] = Image.createImage("/x5.png");
      this.choose[3][1] = Image.createImage("/y2.png");
      this.choose[3][2] = Image.createImage("/y3.png");
      this.choose[3][3] = Image.createImage("/y4.png");
      this.choose[3][4] = Image.createImage("/y5.png");
    }
    catch (Exception localException)
    {
    }
  }

  public void killimages()
  {
    if (this.sel == 0)
    {
      this.choose[1][0] = null;
      this.choose[1][1] = null;
      this.choose[1][2] = null;
      this.choose[1][3] = null;
      this.choose[1][4] = null;
      this.choose[3][1] = null;
      this.choose[3][2] = null;
      this.choose[3][3] = null;
      this.choose[3][4] = null;
    }
    else if (this.sel == 1)
    {
      this.choose[0][0] = null;
      this.choose[0][1] = null;
      this.choose[0][2] = null;
      this.choose[0][3] = null;
      this.choose[0][4] = null;
      this.choose[2][1] = null;
      this.choose[2][2] = null;
      this.choose[2][3] = null;
      this.choose[2][4] = null;
    }
  }

  public void startApp()
  {
    this.tri = 0;
    this.a = 0;
    this.up = 0;
    this.down = 0;
    this.fire = 0;
    this.sound = 0;
    this.count = 0;
    this.selectno = 1;
    this.no = 1;
    this.selectx = 0;
    this.selecty = 30;
    this.selectno = 1;
    this.ap = 2;
    this.user_x = -23;
    this.user_y = 72;
    this.opp_x = 27;
    this.opp_y = 9;
    this.opp_anim = 1;
    this.user_anim = 1;
    this.tar_anim = 3;
    this.rand_g = 1;
    this.bgx = 0;
    this.bgy = 0;
    this.kpuser_movesR = 2;
    this.oppmR = 1;
    this.posy = 18;
    this.posx = 0;
    this.tarR = 1;
    this.hit = 0;
    this.oppth = 0;
    this.points = 0;
    this.sel_img_u = 2;
    this.sel_img_o = 2;
    this.aaaa = 0;
    this.rem = 11;
    this.lev = 1;
    this.vess2 = 0;
    this.index_x = 0;
    this.index_y = 0;
    this.index_user_x = 0;
    this.index_user_y = 0;
    this.ux = 0;
    this.uy = 0;
    this.animflag = 0;
    this.turn = 1;
    this.userth = 0;
    this.user_blink = 0;
    try
    {
      this.imgmenu = Image.createImage("/menu.png");
      this.bullet = Image.createImage("/bullet.png");
      this.bg = Image.createImage("/bg.png");
      this.target = Image.createImage("/target.png");
      this.img[0][0] = Image.createImage("/7a.png");
      this.img[0][1] = Image.createImage("/7b.png");
      this.img[0][2] = Image.createImage("/7c.png");
      this.img[0][3] = Image.createImage("/7d.png");
      this.img[1][0] = Image.createImage("/5a.png");
      this.img[1][1] = Image.createImage("/5b.png");
      this.img[1][2] = Image.createImage("/5c.png");
      this.img[1][3] = Image.createImage("/5d.png");
      this.img[2][0] = Image.createImage("/4a.png");
      this.img[2][1] = Image.createImage("/4b.png");
      this.img[2][2] = Image.createImage("/4c.png");
      this.img[2][3] = Image.createImage("/4d.png");
      this.img[3][0] = Image.createImage("/1a.png");
      this.img[3][1] = Image.createImage("/1b.png");
      this.img[3][2] = Image.createImage("/1c.png");
      this.img[3][3] = Image.createImage("/1d.png");
      this.choose[2][0] = Image.createImage("/w1.png");
      this.choose[3][0] = Image.createImage("/y1.png");
    }
    catch (Exception localException)
    {
    }
    SevenYearItch.FieldMover localFieldMover = new SevenYearItch.FieldMover(this);
    Timer localTimer = new Timer();
    localTimer.schedule(localFieldMover, 0L, 70L);
    this.display.setCurrent(this.intro);
  }

  public void pauseApp()
  {
  }

  public void destroyApp(boolean paramBoolean)
  {
  }

  public void soundStateChanged(Sound paramSound, int paramInt)
  {
  }

  static Random access$002(SevenYearItch paramSevenYearItch, Random paramRandom)
  {
    return (paramSevenYearItch.mRandom = paramRandom);
  }

  static Random access$000(SevenYearItch paramSevenYearItch)
  {
    return paramSevenYearItch.mRandom;
  }

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

    public GameCanvas()
    {
      this.this$0 = paramSevenYearItch;
      try
      {
        paramSevenYearItch.bg = Image.createImage("/bg.png");
      }
      catch (Exception localException)
      {
      }
      paramSevenYearItch.intros.setGain(100);
      paramSevenYearItch.overs.setGain(100);
      paramSevenYearItch.sc.setGain(50);
      paramSevenYearItch.hurt.setGain(50);
      paramSevenYearItch.timerO += 1;
      paramSevenYearItch.go_matchopp = 0;
      paramSevenYearItch.ap = 2;
      paramSevenYearItch.bgx = 0;
      paramSevenYearItch.bgy = 0;
      paramSevenYearItch.kpuser_movesR = 2;
      paramSevenYearItch.user_x = -23;
      paramSevenYearItch.user_y = 72;
      paramSevenYearItch.opp_x = 27;
      paramSevenYearItch.opp_y = 9;
      paramSevenYearItch.oppmR = 1;
      paramSevenYearItch.posy = 18;
      paramSevenYearItch.posx = 0;
      paramSevenYearItch.tarR = 1;
      paramSevenYearItch.w = 128;
      paramSevenYearItch.h = 128;
      paramSevenYearItch.vessu = 0;
      paramSevenYearItch.vesso = 0;
      paramSevenYearItch.hit = 0;
      paramSevenYearItch.oppth = 0;
      paramSevenYearItch.opp_anim = 1;
      paramSevenYearItch.rand_g = 1;
      paramSevenYearItch.user_anim = 1;
      paramSevenYearItch.tar_anim = 3;
      paramSevenYearItch.opp_anim = 1;
      paramSevenYearItch.user_anim = 1;
      paramSevenYearItch.rand_g = 1;
      paramSevenYearItch.turn = 1;
      paramSevenYearItch.ccc = 0;
      paramSevenYearItch.abb = 0;
      paramSevenYearItch.vess = 0;
      paramSevenYearItch.sel_img_u = 2;
      paramSevenYearItch.sel_img_o = 2;
      paramSevenYearItch.lives = 5;
      paramSevenYearItch.lev = 1;
      paramSevenYearItch.fircount = 0;
      paramSevenYearItch.animflag = 0;
    }

    public void paint()
    {
      if (!(this.this$0.checkPause))
      {
        this.this$0.game = 1;
        DirectGraphics localDirectGraphics = DirectUtils.getDirectGraphics(paramGraphics);
        this.this$0.count += 1;
        if (this.this$0.start == 0)
        {
          paramGraphics.setColor(16711680);
          paramGraphics.fillRect(0, 0, this.this$0.w, this.this$0.h);
          if (this.this$0.sel == 0)
          {
            paramGraphics.setColor(16777215);
            paramGraphics.drawRect(20, 55, 35, 30);
            paramGraphics.setColor(0);
            paramGraphics.fillRect(20, 55, 35, 30);
          }
          else if (this.this$0.sel == 1)
          {
            paramGraphics.setColor(16777215);
            paramGraphics.drawRect(65, 55, 35, 29);
            paramGraphics.setColor(0);
            paramGraphics.fillRect(65, 55, 35, 29);
          }
          paramGraphics.drawImage(this.this$0.choose[2][0], 13, 57, 20);
          paramGraphics.drawImage(this.this$0.choose[3][0], 60, 56, 20);
          paramGraphics.setColor(16777215);
          paramGraphics.setFont(Font.getFont(0, 1, 8));
          paramGraphics.drawString("CHOOSE YOUR PLAYER", this.this$0.w / 2, 10, 17);
          paramGraphics.setColor(16777215);
          paramGraphics.setFont(Font.getFont(0, 1, 8));
          paramGraphics.drawString("Press 5 To Select", this.this$0.w / 2, 116, 17);
          paramGraphics.setColor(16777215);
          paramGraphics.setFont(Font.getFont(0, 1, 16));
          if (this.this$0.sel == 0)
            paramGraphics.drawString("Wife", this.this$0.w / 2, 90, 17);
          else
            paramGraphics.drawString("Husband", this.this$0.w / 2, 90, 17);
        }
        else
        {
          paramGraphics.drawImage(this.this$0.bg, this.this$0.bgx, this.this$0.bgy, 20);

⌨️ 快捷键说明

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