コード例 #1
0
ファイル: GUI.java プロジェクト: actorclavilis/InsaneMouse
 private void movePlayers() {
   onePlayerAlive = false;
   Iterator i = players.iterator();
   while (i.hasNext()) {
     Player p = (Player) i.next();
     if (p.getLives() == 0) {
       p.setActive(false);
     }
     if (p.isActive()) {
       onePlayerAlive = true;
       p.move();
     }
   }
 }
コード例 #2
0
ファイル: GUI.java プロジェクト: actorclavilis/InsaneMouse
  private void setup() {
    playerSetup();

    deathLocation = new int[4];
    Arrays.fill(deathLocation, -1);

    menu.setVisible(false);
    this.revalidate();

    audioSetup();

    Iterator i = players.iterator();
    Player p;
    while (i.hasNext()) {
      p = (Player) i.next();
      p.resetLives(3);
      p.setActive(true);
    }

    BufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
    Cursor blank =
        Toolkit.getDefaultToolkit().createCustomCursor(cursorImg, new Point(0, 0), "BLANK");
    this.setCursor(blank);

    reset();

    ballN = 1;
    level = 1;
    timeLast = 0;
    score = 0;
    counterN = 10;
    timeCircle = 0;
    timeCircleSwitch = 0;
    programLoopCounter = 1;
    programSpeedAdjust = 1;

    onePlayerAlive = true;
    countdownF = true;
    circular = true;
    spawnIncrease = true;
    spawnCircleB = false;
    spawnMonsterB = false;
    spawnRandomersB = false;

    levelSetup();
    countdown();
    animate();
  }