Пример #1
0
  public SoccerBall(Vector2D pos, double ballSize, double mass, ArrayList<Wall2D> pitchBoundary) {

    // set up the base class
    super();

    setPositionParams(pos);
    setDirectionParams(ballSize, new Vector2D(0d, 0d), new Vector2D(0d, 1d), new Vector2D(1d, 1d));
    setEnergy(
        mass, -1.0, // max speed - unused
        0, // turn rate - unused
        0); // max force - unused

    this.pitchBoundary = pitchBoundary;
    oldPos = new Vector2D(0d, 0d);
    // oldPos = pos.cloneVec();
  }