Package com.hobbitsadventure.model

Examples of com.hobbitsadventure.model.Tile


      int baseY = (i - minI) * TILE_HEIGHT;
      for (int j = minJ; j <= maxJ; j++) {
        int colIndex = (numCols + j) % numCols;
       
        // Paint tile
        Tile tile = realmMap.getTile(rowIndex, colIndex);
        int x = (j - minJ) * TILE_WIDTH;
        tile.paint(g, x, baseY);
       
        // Paint thing if it's occluded by subsequent tile roles
        Thing thing = realmMap.getThing(rowIndex, colIndex);
        if (thing != null && thing.isOccludedByTerrain()) {
          int y = baseY - 65 + tile.getHeight();
          g.drawImage(thing.getSprite(), x, y, null);
        }
      }
    }
  }
View Full Code Here


    for (int i = minI; i <= maxI; i++) {
      int rowIndex = (numRows + i) % numRows;
      int baseY = (i - minI) * TILE_HEIGHT;
      for (int j = minJ; j <= maxJ; j++) {
        int colIndex = (numCols + j) % numCols;
        Tile tile = realmMap.getTile(rowIndex, colIndex);
        int x = (j - minJ) * TILE_WIDTH;
        int y = baseY - 65 + tile.getHeight();
       
        // Paint thing (if we haven't already)
        Thing thing = realmMap.getThing(rowIndex, colIndex);
        if (thing != null && !thing.isOccludedByTerrain()) {
          g.drawImage(thing.getSprite(), x, y, null);
View Full Code Here

        default:
          throw new RuntimeException("Illegal map character: " + ch)
        }
       
        RealmCell cell = new RealmCell();
        cell.setTile(new Tile(tileClass, tileClass.getYOffset() + heightNoise));
        cell.setThing(thing);
        row[j] = cell;
      }
     
      rowList.add(row);
View Full Code Here

TOP

Related Classes of com.hobbitsadventure.model.Tile

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.