Package civquest.map

Examples of civquest.map.MapData


  }

  public void execute() {
    notifyBefore();

    MapData mapData = Game.getMapData();
    Field field = mapData.getField(position);
    field.setPopulation(population);

    notifyAfter();
  }
View Full Code Here


  }

  public void execute() {
    notifyBefore();

    MapData mapData = Game.getMapData();
    Field field = mapData.getField(position);

    if (looseControl) {
      cityID = field.getRulingCity().getID();
      mapData.removeFieldFromCity(field, field.getRulingCity());
    } else {
      City city = mapData.getCity(cityID);
      mapData.assignFieldToCity(field, city);
    }

    notifyAfter();
  }
View Full Code Here

  }

  public void execute() {
    notifyBefore();

    MapData mapData = Game.getMapData();
    if (mapData.isMapObjectTimed(timedMO)) {
      TurnTimed mo = (TurnTimed)(mapData.getMapObject(timedMO));
      mo.setTime(time);
    } else {
      throw new ClassCastException("SetMapObjectTime must be feeded with"
                     + " the id of a MapObject implementing TurnTimed!!!");
    }
View Full Code Here

    notifyAfter();
  }

  public static GameChange constructSetTimeChange(Long timedMO, int time) {
    MapData mapData = Game.getMapData();
    if (mapData.isUnit(timedMO)) {
      return new SetUnitTime(timedMO, time);
    } else {
      return new SetMapObjectTime(timedMO, time);
    }
  }
View Full Code Here

   * @param buffer any buffer
   */
  public void paintFieldAtUnscrolledCoord(Coordinate unscrPos, Buffer buffer, Graphics2D graphics)
    throws InvalidImageException {

    MapData mapData = Game.getMapData();
    Coordinate scrPos = quadMap.getProperties().adjustArrayCoordToScrolling(unscrPos);
    if (mapData.isOnMap(scrPos)) {
      PaintInfo paintInfo = new PaintInfo(scrPos, unscrPos);
      paintField(paintInfo, buffer, graphics);
    }
  }
View Full Code Here

  }

  public void execute() {
    notifyBefore();

    MapData mapData = Game.getMapData();
    if (mapData.isMapObjectDamagable(damagableMO)) {
      DamagableMapObject mo = (DamagableMapObject)(mapData.getMapObject(damagableMO));
      mo.setHealth(health);
    } else {
      throw new ClassCastException("SetMapObjectHealth must be feeded with"
                     + " the id of a DamagableMapObject!!!");
    }
View Full Code Here

TOP

Related Classes of civquest.map.MapData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.