Files
MonoGame.Extended/Source/MonoGame.Extended.Tiled/TiledMapPolylineObject.cs
T
Lucas Girouard-StranksandDylan Wilson 9e359fb750 Tiled Rework (#331)
* Tiled Rework

* fix failing tests

* really fix failing tests
2017-01-18 20:46:38 +10:00

28 lines
666 B
C#

#region
using Microsoft.Xna.Framework.Content;
using MonoGame.Extended.Primitives;
#endregion
namespace MonoGame.Extended.Tiled
{
public sealed class TiledMapPolylineObject : TiledMapObject
{
public Point2[] Points { get; }
internal TiledMapPolylineObject(ContentReader input)
: base(input)
{
var pointCount = input.ReadInt32();
Points = new Point2[pointCount];
for (var i = 0; i < pointCount; i++)
{
var x = input.ReadSingle();
var y = input.ReadSingle();
Points[i] = new Point2(x, y);
}
}
}
}