mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-12-24 17:29:23 +01:00
only return non-blank tiles in TiledExtensions
This commit is contained in:
parent
1ec8416ab7
commit
deaa841657
1 changed files with 5 additions and 2 deletions
|
@ -76,8 +76,11 @@ namespace MLEM.Extended.Tiled {
|
|||
}
|
||||
|
||||
public static IEnumerable<TiledMapTile> GetTiles(this TiledMap map, int x, int y) {
|
||||
foreach (var layer in map.TileLayers)
|
||||
yield return layer.GetTile(x, y);
|
||||
foreach (var layer in map.TileLayers) {
|
||||
var tile = layer.GetTile(x, y);
|
||||
if (!tile.IsBlank)
|
||||
yield return tile;
|
||||
}
|
||||
}
|
||||
|
||||
public static TiledMapTile GetTile(this TiledMapTileLayer layer, int x, int y) {
|
||||
|
|
Loading…
Reference in a new issue