Exemplo n.º 1
0
 public void Add(Tileset tileset)
 {
     foreach (Tile tile in tileset.Tiles.Values) {
         _registry[tile.Id] = tileset;
         _tileRegistry[tile.Id] = tile;
     }
 }
Exemplo n.º 2
0
 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);
 }