public void Add(Tileset tileset) { foreach (Tile tile in tileset.Tiles.Values) { _registry[tile.Id] = tileset; _tileRegistry[tile.Id] = tile; } }
public Tile(int id, Tileset tileset, int x, int y) { Id = id; _tileset = tileset; Source = new Rectangle(x * tileset.TileWidth, y * tileset.TileHeight, tileset.TileWidth, tileset.TileHeight); }