BattleInfoPlugin.Models.Repositories.MapResource.MapResourcePrivate.GetMapFlags C# (CSharp) Method

GetMapFlags() public static method

public static GetMapFlags ( MapInfo map ) : IEnumerable
map MapInfo
return IEnumerable
            public static IEnumerable<Point> GetMapFlags(MapInfo map)
            {
                var swf = map.ToSwf();
                if (swf == null) return new Point[0];

                return swf.Tags
                    .OfType<DefineSpriteTag>()
                    .SelectMany(sprite => sprite.ControlTags)
                    .OfType<PlaceObject2Tag>()
                    .Where(place => place.Name != null)
                    .Where(place => place.Name.StartsWith("flag"))
                    .Select(place => place.ToPoint())
                    .ToArray();
            }