Package me.daddychurchill.CityWorld.Plats

Examples of me.daddychurchill.CityWorld.Plats.PlatLot


    // depending on the platchunk's type render a layer
    int platX = chunk.chunkX - originX;
    int platZ = chunk.chunkZ - originZ;
   
    PlatLot platlot = platLots[platX][platZ];
    if (platlot != null) {

      // do what we came here for
      platlot.generateChunk(generator, this, chunk, biomes, context, platX, platZ);
    }
  }
View Full Code Here


  public void generateBlocks(RealChunk chunk) {

    // depending on the platchunk's type render a layer
    int platX = chunk.chunkX - originX;
    int platZ = chunk.chunkZ - originZ;
    PlatLot platlot = platLots[platX][platZ];
    if (platlot != null) {

      // do what we came here for
      platlot.generateBlocks(generator, this, chunk, context, platX, platZ);
    }
  }
View Full Code Here

    else
      return false;
  }

  protected boolean isRoad(int x, int z) {
    PlatLot current = platLots[x][z];
    return current != null && (current.style == LotStyle.ROAD || current.style == LotStyle.ROUNDABOUT);
  }
View Full Code Here

  }
 
  public void recycleLot(int x, int z) {

    // if it is not natural, make it so
    PlatLot current = platLots[x][z];
    if (current == null || current.style != LotStyle.NATURE) {
   
      // place nature
      platLots[x][z] = generator.shapeProvider.createNaturalLot(generator, this, x, z);
      naturalPlats++;
View Full Code Here

  public void paveLot(int x, int z, boolean roundaboutPart) {
    if (generator.settings.inRoadRange(originX + x, originZ + z) &&
      (platLots[x][z] == null || roundaboutPart || platLots[x][z].style != LotStyle.ROAD)) {
     
      // remember the old one
      PlatLot oldLot = platLots[x][z];
     
      // clear it please
      emptyLot(x, z);
     
      // place the lot
View Full Code Here

  }
 
  public void emptyLot(int x, int z) {
   
    // keep track of the nature count
    PlatLot current = platLots[x][z];
    if (current != null && current.style == LotStyle.NATURE)
      naturalPlats--;
   
    // empty this one out
    platLots[x][z] = null;
View Full Code Here

     
    // check each neighbor to see if it is also trulyIsolated
    for (int lotX = x - 1; lotX < x + 2; lotX++) {
      for (int lotZ = z - 1; lotZ < z + 2; lotZ++) {
        if (lotX != x && lotZ != z) {
          PlatLot neighbor = getLot(lotX, lotZ);
          if (neighbor != null && neighbor.trulyIsolated)
            return false;
        }
      }
    }
View Full Code Here

 
  public SurroundingLots(PlatMap platmap, int platX, int platZ) {
    neighbors = new boolean[3][3];
   
    // get a list of qualified neighbors
    PlatLot platlot = platmap.getLot(platX, platZ);
    PlatLot[][] neighborChunks = platlot.getNeighborPlatLots(platmap, platX, platZ, true);
    for (int x = 0; x < 3; x++)
      for (int z = 0; z < 3; z++)
        neighbors[x][z] = neighborChunks[x][z] != null;
  }
View Full Code Here

TOP

Related Classes of me.daddychurchill.CityWorld.Plats.PlatLot

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.