Package com.hobbitsadventure.model

Examples of com.hobbitsadventure.model.RealmCell


          break;
        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);
    }
   
    int numRows = rowList.size();
    int numCols = rowList.get(0).length;
    RealmMap realmMap = new RealmMap(numRows, numCols);
    for (int i = 0; i < numRows; i++) {
      for (int j = 0; j < numCols; j++) {
        RealmCell cell = rowList.get(i)[j];
        realmMap.setCell(i, j, cell);
       
        // Add a little more interest to the height map. This is just temporary.
//        double distance = Math.sqrt(((30 - i) * (30 - i)) + ((30 - j) * (30 - j)));
//        int offset = (int) Math.min(distance - 20.0, 0) * 5;
 
View Full Code Here

TOP

Related Classes of com.hobbitsadventure.model.RealmCell

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.