Esempio n. 1
0
        /// <summary>
        /// Creates a new empty dungeon with the passed parameters.
        /// </summary>
        /// <param name="w">The width of the dungeon.</param>
        /// <param name="h">The height of the dungeon.</param>
        /// <param name="d">The depth of the dungeon.</param>
        public Dungeon3(int w, int h, int d)
        {
            // Set the width, height and depth.
            DungeonWidth = w; DungeonHeight = h; DungeonDepth = d;

            // Initialize the mapdata array.
            MapData = new Tile[w, h, d];

            // Set all dungeon tiles to empty.
            IterateDungeonData(delegate(int x, int y, int depth)
            {
                SetTile(x, y, depth, Tile.EmptyTile);
            });

            // Create a new dungeon renderer using this as the dungeon.
            DungeonRenderer = new DungeonRenderer(this);

            // Create the list of NPC's in this dungeon.
            NonPlayerControlled = new List<NonPlayerControlled>();

            #if FOG_OF_WAR
            // Create a new dungeon renderer using this as the dungeon.
            FogOfWar = new FogOfWar(this);
            #endif
        }
Esempio n. 2
0
 /// <summary>
 /// Wipes everything from the face of this dungeon.
 /// </summary>
 public void WipeDungeon()
 {
     NonPlayerControlled = new List<NonPlayerControlled>();
     DungeonRenderer = new DungeonRenderer(this);
     foreach (ITile t in TileIterator)
     {
         t.G = '\0';
         t.C = Colour.Standard;
         t.Items = new Items.ItemCollection();
         t.TileFlags = TileFlags.None;
         t.TileType = TileType.Nothing;
     }
 }