Ejemplo n.º 1
0
        static string Format(CardinalTileSelectorKey k,
                             ITileTagEntrySelectionFactory <bool> formatProvider = null,
                             string format = null)
        {
            formatProvider ??= TileTagEntries.CreateFlagTagEntries();
            format ??= "{{0}}_n{0}e{1}s{2}w{3}";
            var n = formatProvider.Lookup(k.North).Tag;
            var e = formatProvider.Lookup(k.East).Tag;
            var s = formatProvider.Lookup(k.South).Tag;
            var w = formatProvider.Lookup(k.West).Tag;

            return(string.Format(format, n, e, s, w));
        }
Ejemplo n.º 2
0
        public bool TryFind(string tag, CardinalTileSelectorKey selector, out TRenderTile tile)
        {
            var format = suffixMapping[selector.LinearIndex];

            return(baseRegistry.TryFind(string.Format(format, tag), out tile));
        }