Beispiel #1
0
        /*********
        ** Public methods
        *********/
        /****
        ** Location
        ****/
        /// <summary>Get the tile coordinates in the game location.</summary>
        /// <param name="location">The game location to search.</param>
        public static IEnumerable <Vector2> GetTiles(this GameLocation location)
        {
            if (location?.Map?.Layers == null)
            {
                return(Enumerable.Empty <Vector2>());
            }

            Layer layer = location.Map.Layers[0];

            return(TileHelper.GetTiles(0, 0, layer.LayerWidth, layer.LayerHeight));
        }
Beispiel #2
0
 /****
 ** Rectangle
 ****/
 /// <summary>Get the tile coordinates in the tile area.</summary>
 /// <param name="area">The tile area to search.</param>
 public static IEnumerable <Vector2> GetTiles(this Rectangle area)
 {
     return(TileHelper.GetTiles(area.X, area.Y, area.Width, area.Height));
 }