private TileType ParseTileFromRule(LevelBuilderRule rule, TileType[] tileTypes) { int index; if (int.TryParse(rule.Tile, out index)) { return(tileTypes[index]); } return(tileTypes.First(t => t.Type == rule.Tile)); }
private TileType ParseTileFromRule(LevelBuilderRule rule, TileType[] tileTypes) { int index; if (int.TryParse(rule.Tile, out index)) { return tileTypes[index]; } return tileTypes.First(t => t.Type == rule.Tile); }