Exemplo n.º 1
0
 /// <summary>
 /// Creates a new dungeon artitect to work within the specified bounds
 /// </summary>
 /// <param name="iSize"></param>
 /// <param name="jSize"></param>
 public DungeonArtitect(int iSize, int jSize)
 {
     _Blueprint = new SquareCellMap <BlueprintCell>(iSize, jSize);
     for (int i = 0; i < iSize; i++)
     {
         for (int j = 0; j < jSize; j++)
         {
             _Blueprint[i, j] = new BlueprintCell();
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 'Delete' a cell in the blueprint by returning it to
 /// </summary>
 /// <param name="i"></param>
 /// <param name="j"></param>
 /// <param name="room"></param>
 protected void DeleteCell(int i, int j, Room room)
 {
     if (Blueprint.Exists(i, j))
     {
         BlueprintCell cell = Blueprint[i, j];
         if (cell.Room == room)
         {
             cell.Room           = null;
             cell.GenerationType = CellGenerationType.Untouched;
         }
     }
 }