示例#1
0
  public void work(Tank tank) {

    if (tank.army == 1) {
      for (Tank otherTank : map.layer_3_CT) {
        if (otherTank.tankState != 5) {
          otherTank.tempState = otherTank.tankState;
          otherTank.tankState = 5;
        }
      }
      timer = new Timer(12000, this);
      timer.start();
    } else {
      for (Tank otherTank : map.layer_3_UT) {
        if (otherTank.tankState != 5) {
          otherTank.tempState = otherTank.tankState;
          otherTank.tankState = 5;
        }
      }
      timer = new Timer(5000, this);
      timer.start();
    }
    influTank = tank;
    life--;
  }