A tile representing the floor of the world. Everything is build on the floor and actors also move on the floor.
상속: Tile, IDisposable
예제 #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>();
 }
예제 #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);
 }