/// <summary>
 /// Initialize the array base on the size of the dungeon.
 /// </summary>
 void InitializeMap()
 {
     Map = new DungeonComponents[m_iSizeX][];
     for (int i = 0; i < m_iSizeX; i++)
     {
         Map[i] = new DungeonComponents[m_iSizeZ];
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// This method initialize the array that represent the room.
 /// </summary>
 private void CreateRoom()
 {
     m_ThisRoom = new DungeonComponents[m_iSizeX][];
     for (int i = 0; i < m_iSizeX; i++)
     {
         m_ThisRoom[i] = new DungeonComponents[m_iSizeZ];
         for (int j = 0; j < m_iSizeZ; j++)
         {
             if (i == 0 || i == m_iSizeX - 1)
             {
                 m_ThisRoom[i][j] = DungeonComponents.Wall;
             }
             else if (j == 0 || j == m_iSizeZ - 1)
             {
                 m_ThisRoom[i][j] = DungeonComponents.Wall;
             }
             else
             {
                 m_ThisRoom[i][j] = DungeonComponents.Floor;
             }
         }
     }
 }