public List <Sprite> GetSpritesByTileSetAndType(TileSet set, TileType type) { RoomSpriteCollection targetCollection = GetSpriteCollectionByTileSet(set); List <Sprite> results = GetSpritesByTileType(targetCollection, type); return(results); }
public List <Sprite> GetSpritesByTileType(RoomSpriteCollection collection, TileType type) { if (collection == null) { return(null); } int count = collection.tileSets.Count; for (int i = 0; i < count; i++) { if (collection.tileSets[i].tileType == type) { return(collection.tileSets[i].sprites); } } return(null); }