Add() публичный Метод

Fügt den angegebenen Tile zu dem overlay hinzu.
public Add ( Tile tile, bool update = false ) : void
tile Tile Das Tile das hinzugefügt wird.
update bool
Результат void
Пример #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);
 }