A tile representing the floor of the world. Everything is build on the floor and actors also move on the floor.
Inheritance: Tile, IDisposable
Exemple #1
0
 /// <summary>
 /// Basic constructor (creating an empty map)
 /// </summary>
 public Map()
 {
     _updateTiles = new HashSet<Coords>();
     _actors = new List<Actor>();
     _blankTile = new FloorTile(this);
     _blankTile.coords = new Backend.Coords(-1, -1);
     _blankTile.Add(new GapTile(_blankTile));
     _tiles = new List<List<FloorTile>>();
     _exits = new List<Exit>();
 }
Exemple #2
0
 /// <summary>
 /// Method to drop an item from an actor to the ground.
 /// Deletes the item from the inventory and creats an itemtile to place the item on the ground
 /// </summary>
 /// <param name="tile">The tile on which the itemtile with the item will be added.</param>
 public void Drop(FloorTile tile)
 {
     if (_owner != null)
         _owner.inventory.Remove(this);
     _owner = null;
     _tile = new ItemTile(tile, this);
     tile.Add(_tile);
 }