public RenderLayerDefinition(TerrainMatchType matchType, string tag, string matchAs, IReadOnlyList <string> matchWith) { Tag = tag; MatchType = matchType; MatchAs = matchAs; MatchWith = matchWith ?? throw new ArgumentNullException(nameof(matchWith)); }
public TerrainGraphic WithMatchRule(int layer, TerrainMatchType matchType, string tag, string self = null, params string[] with) { if (layer < 0) { throw new ArgumentException(); } MatchRule = new Dictionary <int, RenderLayerDefinition>((IDictionary <int, RenderLayerDefinition>)MatchRule) { [layer] = new RenderLayerDefinition(matchType, tag, self, new List <string>(with)) }; return(this); }
internal static bool IsMatch(this TerrainTile tile, TerrainMatchType match) { switch (match) { case TerrainMatchType.Land: if (tile.IsLandTile()) { return(true); } break; case TerrainMatchType.Sea: if (tile.IsSeaTile()) { return(true); } break; } return(false); }