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

📄 yosamabin_n60.java

📁 拉登采矿
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
      //   317: invokeinterface 50 1 0
      //   322: goto +8 -> 330
      //   325: astore 11
      //   327: goto +3 -> 330
      //   330: aload 9
      //   332: athrow
      //   333: return
      //
      // Exception table:
      //   from	to	target	type
      //   197	206	209	java/lang/Exception
      //   0	190	217	java/lang/Exception
      //   284	293	296	java/lang/Exception
      //   0	190	304	finally
      //   217	277	304	finally
      //   304	306	304	finally
      //   313	322	325	java/lang/Exception
    }

    private void formatScore()
    {
      try
      {
        super.delete(0);
        int i = 0;
        int j = 0;
        this.score[i][j] = "";
        for (int k = 0; k < this.str.length(); ++k)
          if ((this.str.charAt(k) == '~') && (this.str.charAt(k + 1) == '~'))
          {
            if (j == 1)
            {
              ++i;
              j = 0;
            }
            this.score[i][(++j)] = "";
            ++k;
          }
          else
          {
            this.score[i][j] = this.score[i][j] + this.str.charAt(k);
          }
        try
        {
          while (super.size() > 0)
            super.delete(super.size() - 1);
        }
        catch (Exception localException2)
        {
        }
        super.append("Top 10 scores\n");
        for (int l = 0; l < 10; ++l)
          if ((this.score[l][0].length() != 0) || (this.score[l][0] != "null"))
            super.append("" + (l + 1) + ". " + this.score[l][0] + " - " + this.score[l][1] + "\n");
        this.cnt = 0;
      }
      catch (Exception localException1)
      {
      }
      addCommand(this.cmBack);
    }

    public void commandAction(, Displayable paramDisplayable)
    {
      if (paramCommand == this.cmBack)
      {
        try
        {
          this.this$0.shwScr.c.close();
        }
        catch (Exception localException)
        {
        }
        YosamaBin_N60.a = 2;
        this.this$0.display.setCurrent(this.this$0.intro);
        while (super.size() > 0)
          super.delete(super.size() - 1);
        removeCommand(this.cmBack);
      }
    }
  }

  class SubmitPoints extends Form
  implements CommandListener
  {
    private Command cmCancel;
    private Command cmOK;
    private Command cmTry;
    private TextField txtName;
    private String strName;
    private int points;
    private int checkSub;
    public int cnt;
    HttpConnection conn;
    private final YosamaBin_N60 this$0;

    SubmitPoints()
    {
      super("Submit Points");
      this.this$0 = paramYosamaBin_N60;
      this.conn = null;
      this.cmOK = new Command("OK", 1, 1);
      this.cmTry = new Command("Try Again", 1, 1);
      this.cmCancel = new Command("Cancel", 3, 1);
      addCommand(this.cmCancel);
      setCommandListener(this);
    }

    public void scroll()
    {
      if (this.cnt > 0)
        this.cnt += 1;
    }

    public void subPoints()
    {
      String str;
      try
      {
        str = "http://203.199.107.129/wapsite/SubmitScore.asp?game=YosamaBin&name=" + this.strName.replace(' ', '_') + "&score=" + this.points + "&series=60";
        this.conn = ((HttpConnection)Connector.open(str));
        long l = this.conn.getLength();
        while (super.size() > 0)
          super.delete(super.size() - 1);
        removeCommand(this.cmOK);
        removeCommand(this.cmTry);
        YosamaBin_N60.a = 2;
        this.this$0.display.setCurrent(this.this$0.intro);
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
        removeCommand(this.cmOK);
        addCommand(this.cmTry);
        while (super.size() >= 1)
          super.delete(super.size() - 1);
        this.checkSub = 0;
        super.append("Connection Failed\n");
      }
    }

    public void commandAction(, Displayable paramDisplayable)
    {
      if (paramCommand == this.cmCancel)
      {
        while (super.size() > 0)
          super.delete(super.size() - 1);
        removeCommand(this.cmOK);
        removeCommand(this.cmTry);
        if (this.this$0.subPts.conn != null)
          try
          {
            this.this$0.subPts.conn.close();
          }
          catch (Exception localException)
          {
          }
        YosamaBin_N60.a = 2;
        this.this$0.display.setCurrent(this.this$0.intro);
        this.checkSub = 0;
      }
      else if (paramCommand == this.cmOK)
      {
        this.checkSub += 1;
        if (this.checkSub == 1)
        {
          this.cnt = 1;
          subPoints();
          super.append("Submiting your score please wait...");
        }
      }
      else if (paramCommand == this.cmTry)
      {
        this.checkSub += 1;
        if (this.checkSub == 1)
        {
          this.cnt = 1;
          while (super.size() > 1)
            super.delete(super.size() - 1);
          super.append("Submiting your score please wait...");
        }
      }
    }

    public void setData(, String paramString)
    {
      this.points = paramInt;
      this.cnt = 0;
      this.checkSub = 0;
      this.strName = new String(paramString);
      super.append("Name " + paramString + "\nScore " + paramInt + "\n");
      addCommand(this.cmOK);
    }

    public int getData()
    {
      return this.points;
    }
  }

  class Entername extends Form
  implements CommandListener
  {
    private Command cmCancel;
    private Command cmOK;
    private final YosamaBin_N60 this$0;

    Entername()
    {
      super("Enter Your Name");
      this.this$0 = paramYosamaBin_N60;
      this.cmOK = new Command("OK", 1, 1);
      this.cmCancel = new Command("Cancel", 3, 1);
      paramYosamaBin_N60.name = new TextField("Your name:", "", 7, 0);
      addCommand(this.cmOK);
      addCommand(this.cmCancel);
      super.append(paramYosamaBin_N60.name);
      setCommandListener(this);
    }

    public void commandAction(, Displayable paramDisplayable)
    {
      if (paramCommand == this.cmOK)
      {
        if (this.this$0.name.getString().length() != 0)
        {
          this.this$0.name1 = this.this$0.name.getString();
          this.this$0.scr[5] = YosamaBin_N60.score;
          this.this$0.str[5] = this.this$0.name1;
          this.this$0.Sorting();
          this.this$0.store = this.this$0.str[0] + "@" + this.this$0.scr[0] + "/" + this.this$0.str[1] + "*" + this.this$0.scr[1] + "~" + this.this$0.str[2] + "^" + this.this$0.scr[2] + "(" + this.this$0.str[3] + ")" + this.this$0.scr[3] + "!" + this.this$0.str[4] + "#" + this.this$0.scr[4] + "%" + this.this$0.str[5] + "&" + this.this$0.scr[5];
          SaveGame.saveGame(this.this$0.store);
          System.out.println("store " + this.this$0.store);
          YosamaBin_N60.gamePaint = 0;
          if (this.this$0.yes == true)
          {
            YosamaBin_N60.a = 11;
            this.this$0.subPts = new YosamaBin_N60.SubmitPoints(this.this$0);
            this.this$0.subPts.setData(YosamaBin_N60.score, this.this$0.name1);
            this.this$0.display.setCurrent(this.this$0.subPts);
          }
          else
          {
            YosamaBin_N60.a = 2;
            this.this$0.display.setCurrent(this.this$0.intro);
          }
        }
      }
      else if (paramCommand == this.cmCancel)
      {
        YosamaBin_N60.a = 2;
        this.this$0.display.setCurrent(this.this$0.intro);
      }
    }
  }

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

    public GameCanvas()
    {
      this.this$0 = paramYosamaBin_N60;
    }

    public void paint()
    {
      if (!(this.this$0.checkPause))
      {
        YosamaBin_N60.game = 1;
        YosamaBin_N60.gameend = 0;
        DirectGraphics localDirectGraphics = DirectUtils.getDirectGraphics(paramGraphics);
        this.this$0.gcounter += 1;
        paramGraphics.drawImage(this.this$0.bg, 0, 0, 0x10 | 0x4);
        if (!(this.this$0.levelchanged))
        {
          this.this$0.drawstones(paramGraphics);
          if (this.this$0.weight >= 200)
            this.this$0.motion = 3;
          if (this.this$0.weight >= 400)
            this.this$0.motion = 2;
          if (this.this$0.hit)
          {
            if (this.this$0.hitcount == 1)
              this.this$0.playsnd(5);
            if (this.this$0.side == 1)
            {
              this.this$0.bullet1x = -50;
              this.this$0.bullet2x = -50;
            }
            else
            {
              this.this$0.bullet1x = (YosamaBin_N60.w + 50);
              this.this$0.bullet2x = (YosamaBin_N60.w + 50);
            }
            this.this$0.up = false;
            this.this$0.down = false;
            this.this$0.left = false;
            this.this$0.right = false;
            this.this$0.hitcount += 1;
            if (this.this$0.hitcount < 5)
            {
              paramGraphics.drawImage(this.this$0.imhit, this.this$0.yosamax - 30, this.this$0.yosamay - 25, 0x10 | 0x4);
            }
            else
            {
              if (this.this$0.hitcount % 2 == 0)
                this.this$0.yosamamov(paramGraphics, localDirectGraphics);
              if (this.this$0.hitcount >= 20)
              {
                this.this$0.hit = false;
                this.this$0.lives -= 1;
                this.this$0.hitcount = 0;
              }
            }
          }
          else
          {
            this.this$0.yosamamov(paramGraphics, localDirectGraphics);
            if (this.this$0.dropsanim == 1)
            {
              if (this.this$0.dir == 2)
                paramGraphics.drawImage(this.this$0.drops[1], this.this$0.yosamax + this.this$0.stand[1].getWidth(), this.this$0.yosamay + 10, 0x10 | 0x4);
              else
                paramGraphics.drawImage(this.this$0.drops[4], this.this$0.yosamax - this.this$0.stand[1].getWidth() / 2, this.this$0.yosamay + 10, 0x10 | 0x4);
              this.this$0.dropsanim += 1;
            }
            else if (this.this$0.dropsanim == 2)
            {
              if (this.this$0.dir == 2)
                paramGraphics.drawImage(this.this$0.drops[2], this.this$0.yosamax + this.this$0.stand[1].getWidth(), this.this$0.yosamay + 10, 0x10 | 0x4);
              else
                paramGraphics.drawImage(this.this$0.drops[5], this.this$0.yosamax - this.this$0.stand[1].getWidth() / 2, this.this$0.yosamay + 10, 0x10 | 0x4);
              this.this$0.dropsanim += 1;
            }
            else if (this.this$0.dropsanim == 3)
            {
              if (this.this$0.dir == 2)
                paramGraphics.drawImage(this.this$0.drops[3], this.this$0.yosamax + this.this$0.stand[1].getWidth(), this.this$0.yosamay + 10, 0x10 | 0x4);
              else
                paramGraphics.drawImage(this.this$0.drops[6], this.this$0.yosamax - this.this$0.stand[1].getWidth() / 2, this.this$0.yosamay + 10, 0x10 | 0x4);
              this.this$0.dropsanim = 0;
            }
          }
          if (this.this$0.points > 0)
          {
            paramGraphics.setColor(255, 0, 0);
            paramGraphics.setFont(Font.getFont(0, 1, 8));
            paramGraphics.drawString("" + this.this$0.points, this.this$0.pointx, this.this$0.pointy, 0x1

⌨️ 快捷键说明

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