Gruppe22.Backend.FloorTile.Add C# (CSharp) Метод

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
        public void Add(Tile tile, bool update = false)
        {
            _overlay.Add(tile);
            tile.parent = this;
            if (update)
            {
                if (!((Map)_parent).updateTiles.Contains(_coords))
                    ((Map)_parent).updateTiles.Add(_coords);
            }
        }

Usage Example

Пример #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>();
 }
All Usage Examples Of Gruppe22.Backend.FloorTile::Add