diff --git a/docs/docfx.json b/docs/docfx.json
index fa6feed..4c955cb 100644
--- a/docs/docfx.json
+++ b/docs/docfx.json
@@ -9,7 +9,8 @@
]
}
],
- "dest": "api"
+ "dest": "api",
+ "enumSortOrder": "declaringOrder"
}
],
"build": {
diff --git a/src/DotTiled.Benchmark/Program.cs b/src/DotTiled.Benchmark/Program.cs
index e04c6b1..55c04cf 100644
--- a/src/DotTiled.Benchmark/Program.cs
+++ b/src/DotTiled.Benchmark/Program.cs
@@ -39,7 +39,7 @@ namespace MyBenchmarks
[BenchmarkCategory("MapFromInMemoryTmxString")]
[Benchmark(Baseline = true, Description = "DotTiled")]
- public DotTiled.Model.Map LoadWithDotTiledFromInMemoryTmxString()
+ public DotTiled.Model LoadWithDotTiledFromInMemoryTmxString()
{
using var stringReader = new StringReader(_tmxContents);
using var xmlReader = XmlReader.Create(stringReader);
@@ -49,7 +49,7 @@ namespace MyBenchmarks
[BenchmarkCategory("MapFromInMemoryTmjString")]
[Benchmark(Baseline = true, Description = "DotTiled")]
- public DotTiled.Model.Map LoadWithDotTiledFromInMemoryTmjString()
+ public DotTiled.Model LoadWithDotTiledFromInMemoryTmjString()
{
using var mapReader = new DotTiled.Serialization.Tmj.TmjMapReader(_tmjContents, _ => throw new Exception(), _ => throw new Exception(), []);
return mapReader.ReadMap();
diff --git a/src/DotTiled.Tests/Assert/AssertData.cs b/src/DotTiled.Tests/Assert/AssertData.cs
index 3c18ef9..3ddcf4a 100644
--- a/src/DotTiled.Tests/Assert/AssertData.cs
+++ b/src/DotTiled.Tests/Assert/AssertData.cs
@@ -1,4 +1,4 @@
-using DotTiled.Model.Layers;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Assert/AssertImage.cs b/src/DotTiled.Tests/Assert/AssertImage.cs
index 613318b..51a9b82 100644
--- a/src/DotTiled.Tests/Assert/AssertImage.cs
+++ b/src/DotTiled.Tests/Assert/AssertImage.cs
@@ -1,4 +1,4 @@
-using DotTiled.Model.Tilesets;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Assert/AssertLayer.cs b/src/DotTiled.Tests/Assert/AssertLayer.cs
index 1cb9e36..89886cc 100644
--- a/src/DotTiled.Tests/Assert/AssertLayer.cs
+++ b/src/DotTiled.Tests/Assert/AssertLayer.cs
@@ -1,4 +1,4 @@
-using DotTiled.Model.Layers;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Assert/AssertObject.cs b/src/DotTiled.Tests/Assert/AssertObject.cs
index f234ed2..93a5c45 100644
--- a/src/DotTiled.Tests/Assert/AssertObject.cs
+++ b/src/DotTiled.Tests/Assert/AssertObject.cs
@@ -1,4 +1,4 @@
-using DotTiled.Model.Layers.Objects;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Assert/AssertProperties.cs b/src/DotTiled.Tests/Assert/AssertProperties.cs
index ddd0e69..16d9cdb 100644
--- a/src/DotTiled.Tests/Assert/AssertProperties.cs
+++ b/src/DotTiled.Tests/Assert/AssertProperties.cs
@@ -1,4 +1,4 @@
-using DotTiled.Model.Properties;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Assert/AssertTileset.cs b/src/DotTiled.Tests/Assert/AssertTileset.cs
index c0e5e8e..3e4ab28 100644
--- a/src/DotTiled.Tests/Assert/AssertTileset.cs
+++ b/src/DotTiled.Tests/Assert/AssertTileset.cs
@@ -1,5 +1,5 @@
-using DotTiled.Model.Layers;
-using DotTiled.Model.Tilesets;
+using DotTiled.Model;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Serialization/TestData.cs b/src/DotTiled.Tests/Serialization/TestData.cs
index 467e1df..30c4b9f 100644
--- a/src/DotTiled.Tests/Serialization/TestData.cs
+++ b/src/DotTiled.Tests/Serialization/TestData.cs
@@ -1,6 +1,6 @@
using System.Xml;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Properties.CustomTypes;
+using DotTiled.Model;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.cs b/src/DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.cs
index c445069..4eef6de 100644
--- a/src/DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.cs
+++ b/src/DotTiled.Tests/Serialization/TestData/Map/default-map/default-map.cs
@@ -1,5 +1,5 @@
using DotTiled.Model;
-using DotTiled.Model.Layers;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/map-external-tileset-multi.cs b/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/map-external-tileset-multi.cs
index e1aecda..04c425a 100644
--- a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/map-external-tileset-multi.cs
+++ b/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-multi/map-external-tileset-multi.cs
@@ -1,8 +1,8 @@
using System.Globalization;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Tilesets;
+using DotTiled.Model;
+using DotTiled.Model;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/map-external-tileset-wangset.cs b/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/map-external-tileset-wangset.cs
index 7e21c54..a894a53 100644
--- a/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/map-external-tileset-wangset.cs
+++ b/src/DotTiled.Tests/Serialization/TestData/Map/map-external-tileset-wangset/map-external-tileset-wangset.cs
@@ -1,7 +1,7 @@
using System.Globalization;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Tilesets;
+using DotTiled.Model;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-common-props/map-with-common-props.cs b/src/DotTiled.Tests/Serialization/TestData/Map/map-with-common-props/map-with-common-props.cs
index 7b4de68..14f95ac 100644
--- a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-common-props/map-with-common-props.cs
+++ b/src/DotTiled.Tests/Serialization/TestData/Map/map-with-common-props/map-with-common-props.cs
@@ -1,7 +1,7 @@
using System.Globalization;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Properties;
+using DotTiled.Model;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-custom-type-props/map-with-custom-type-props.cs b/src/DotTiled.Tests/Serialization/TestData/Map/map-with-custom-type-props/map-with-custom-type-props.cs
index 47a6b6b..e7d135c 100644
--- a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-custom-type-props/map-with-custom-type-props.cs
+++ b/src/DotTiled.Tests/Serialization/TestData/Map/map-with-custom-type-props/map-with-custom-type-props.cs
@@ -1,8 +1,8 @@
using System.Globalization;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Properties.CustomTypes;
+using DotTiled.Model;
+using DotTiled.Model;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-embedded-tileset/map-with-embedded-tileset.cs b/src/DotTiled.Tests/Serialization/TestData/Map/map-with-embedded-tileset/map-with-embedded-tileset.cs
index 0673cf6..e9c4e73 100644
--- a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-embedded-tileset/map-with-embedded-tileset.cs
+++ b/src/DotTiled.Tests/Serialization/TestData/Map/map-with-embedded-tileset/map-with-embedded-tileset.cs
@@ -1,7 +1,7 @@
using System.Globalization;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Tilesets;
+using DotTiled.Model;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/map-with-external-tileset.cs b/src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/map-with-external-tileset.cs
index efea5c0..055a0c9 100644
--- a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/map-with-external-tileset.cs
+++ b/src/DotTiled.Tests/Serialization/TestData/Map/map-with-external-tileset/map-with-external-tileset.cs
@@ -1,7 +1,7 @@
using System.Globalization;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Tilesets;
+using DotTiled.Model;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/map-with-flippingflags.cs b/src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/map-with-flippingflags.cs
index d2f1813..96995d7 100644
--- a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/map-with-flippingflags.cs
+++ b/src/DotTiled.Tests/Serialization/TestData/Map/map-with-flippingflags/map-with-flippingflags.cs
@@ -1,7 +1,7 @@
using System.Globalization;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Tilesets;
+using DotTiled.Model;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/map-with-many-layers.cs b/src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/map-with-many-layers.cs
index 2b09178..320fa48 100644
--- a/src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/map-with-many-layers.cs
+++ b/src/DotTiled.Tests/Serialization/TestData/Map/map-with-many-layers/map-with-many-layers.cs
@@ -1,9 +1,9 @@
using System.Numerics;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Layers.Objects;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Tilesets;
+using DotTiled.Model;
+using DotTiled.Model;
+using DotTiled.Model;
+using DotTiled.Model;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Serialization/Tmj/TmjMapReaderTests.cs b/src/DotTiled.Tests/Serialization/Tmj/TmjMapReaderTests.cs
index c862203..a856f68 100644
--- a/src/DotTiled.Tests/Serialization/Tmj/TmjMapReaderTests.cs
+++ b/src/DotTiled.Tests/Serialization/Tmj/TmjMapReaderTests.cs
@@ -1,6 +1,6 @@
using DotTiled.Model;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
+using DotTiled.Model;
+using DotTiled.Model;
using DotTiled.Serialization.Tmj;
namespace DotTiled.Tests;
diff --git a/src/DotTiled.Tests/Serialization/Tmx/TmxMapReaderTests.cs b/src/DotTiled.Tests/Serialization/Tmx/TmxMapReaderTests.cs
index ab48769..6a26b62 100644
--- a/src/DotTiled.Tests/Serialization/Tmx/TmxMapReaderTests.cs
+++ b/src/DotTiled.Tests/Serialization/Tmx/TmxMapReaderTests.cs
@@ -1,7 +1,7 @@
using System.Xml;
using DotTiled.Model;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
+using DotTiled.Model;
+using DotTiled.Model;
using DotTiled.Serialization.Tmx;
namespace DotTiled.Tests;
diff --git a/src/DotTiled/DotTiled.csproj b/src/DotTiled/DotTiled.csproj
index 0102e6e..0a2dfe8 100644
--- a/src/DotTiled/DotTiled.csproj
+++ b/src/DotTiled/DotTiled.csproj
@@ -3,6 +3,7 @@
net8.0
enable
+ true
diff --git a/src/DotTiled/Model/Color.cs b/src/DotTiled/Model/Color.cs
index 4700e0c..24cf8e5 100644
--- a/src/DotTiled/Model/Color.cs
+++ b/src/DotTiled/Model/Color.cs
@@ -1,22 +1,57 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
+using System.Threading;
namespace DotTiled.Model;
+///
+/// Represents a Tiled color.
+///
public class Color : IParsable, IEquatable
{
+ ///
+ /// The red component of the color.
+ ///
public required byte R { get; set; }
+
+ ///
+ /// The green component of the color.
+ ///
public required byte G { get; set; }
+
+ ///
+ /// The blue component of the color.
+ ///
public required byte B { get; set; }
+
+ ///
+ /// The alpha component of the color.
+ ///
public byte A { get; set; } = 255;
+ ///
+ /// Attempts to parse the specified string into a . Expects strings in the format #RRGGBB or #AARRGGBB.
+ /// The leading # is optional.
+ ///
+ /// A string value to parse into a
+ /// An object that supplies culture-specific information about the format of s.
+ /// The parsed
+ /// Thrown in case the provided string is not in a valid format.
public static Color Parse(string s, IFormatProvider? provider)
{
TryParse(s, provider, out var result);
return result ?? throw new FormatException($"Invalid format for TiledColor: {s}");
}
+ ///
+ /// Attempts to parse the specified string into a . Expects strings in the format #RRGGBB or #AARRGGBB.
+ /// The leading # is optional.
+ ///
+ /// A string value to parse into a
+ /// An object that supplies culture-specific information about the format of s.
+ /// When this method returns, contains the parsed or null on failure.
+ /// true if was successfully parsed; otherwise, false.
public static bool TryParse(
[NotNullWhen(true)] string? s,
IFormatProvider? provider,
@@ -55,6 +90,7 @@ public class Color : IParsable, IEquatable
return true;
}
+ ///
public bool Equals(Color? other)
{
if (other is null)
@@ -63,9 +99,12 @@ public class Color : IParsable, IEquatable
return R == other.R && G == other.G && B == other.B && A == other.A;
}
+ ///
public override bool Equals(object? obj) => obj is Color other && Equals(other);
+ ///
public override int GetHashCode() => HashCode.Combine(R, G, B, A);
+ ///
public override string ToString() => $"#{A:x2}{R:x2}{G:x2}{B:x2}";
}
diff --git a/src/DotTiled/Model/Layers/BaseLayer.cs b/src/DotTiled/Model/Layers/BaseLayer.cs
index adeee69..f73c760 100644
--- a/src/DotTiled/Model/Layers/BaseLayer.cs
+++ b/src/DotTiled/Model/Layers/BaseLayer.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
-using DotTiled.Model.Properties;
-namespace DotTiled.Model.Layers;
+namespace DotTiled.Model;
public abstract class BaseLayer
{
diff --git a/src/DotTiled/Model/Layers/Data.cs b/src/DotTiled/Model/Layers/Data.cs
index 2d54020..7388828 100644
--- a/src/DotTiled/Model/Layers/Data.cs
+++ b/src/DotTiled/Model/Layers/Data.cs
@@ -1,6 +1,6 @@
using System;
-namespace DotTiled.Model.Layers;
+namespace DotTiled.Model;
public enum DataEncoding
{
diff --git a/src/DotTiled/Model/Layers/Group.cs b/src/DotTiled/Model/Layers/Group.cs
index fd89f61..9fa68da 100644
--- a/src/DotTiled/Model/Layers/Group.cs
+++ b/src/DotTiled/Model/Layers/Group.cs
@@ -1,6 +1,6 @@
using System.Collections.Generic;
-namespace DotTiled.Model.Layers;
+namespace DotTiled.Model;
public class Group : BaseLayer
{
diff --git a/src/DotTiled/Model/Layers/ImageLayer.cs b/src/DotTiled/Model/Layers/ImageLayer.cs
index cd35a41..fbdf54e 100644
--- a/src/DotTiled/Model/Layers/ImageLayer.cs
+++ b/src/DotTiled/Model/Layers/ImageLayer.cs
@@ -1,6 +1,4 @@
-using DotTiled.Model.Tilesets;
-
-namespace DotTiled.Model.Layers;
+namespace DotTiled.Model;
public class ImageLayer : BaseLayer
{
diff --git a/src/DotTiled/Model/Layers/ObjectLayer.cs b/src/DotTiled/Model/Layers/ObjectLayer.cs
index 817e95e..04f97dd 100644
--- a/src/DotTiled/Model/Layers/ObjectLayer.cs
+++ b/src/DotTiled/Model/Layers/ObjectLayer.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
-using DotTiled.Model.Layers.Objects;
-namespace DotTiled.Model.Layers;
+namespace DotTiled.Model;
public enum DrawOrder
{
diff --git a/src/DotTiled/Model/Layers/Objects/EllipseObject.cs b/src/DotTiled/Model/Layers/Objects/EllipseObject.cs
index fe57573..8e75338 100644
--- a/src/DotTiled/Model/Layers/Objects/EllipseObject.cs
+++ b/src/DotTiled/Model/Layers/Objects/EllipseObject.cs
@@ -1,3 +1,3 @@
-namespace DotTiled.Model.Layers.Objects;
+namespace DotTiled.Model;
public class EllipseObject : Object { }
diff --git a/src/DotTiled/Model/Layers/Objects/Object.cs b/src/DotTiled/Model/Layers/Objects/Object.cs
index 82254e5..98935b1 100644
--- a/src/DotTiled/Model/Layers/Objects/Object.cs
+++ b/src/DotTiled/Model/Layers/Objects/Object.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
-using DotTiled.Model.Properties;
-namespace DotTiled.Model.Layers.Objects;
+namespace DotTiled.Model;
public abstract class Object
{
diff --git a/src/DotTiled/Model/Layers/Objects/PointObject.cs b/src/DotTiled/Model/Layers/Objects/PointObject.cs
index f2949a2..e606c37 100644
--- a/src/DotTiled/Model/Layers/Objects/PointObject.cs
+++ b/src/DotTiled/Model/Layers/Objects/PointObject.cs
@@ -1,3 +1,3 @@
-namespace DotTiled.Model.Layers.Objects;
+namespace DotTiled.Model;
public class PointObject : Object { }
diff --git a/src/DotTiled/Model/Layers/Objects/PolygonObject.cs b/src/DotTiled/Model/Layers/Objects/PolygonObject.cs
index 57e3f06..6a58592 100644
--- a/src/DotTiled/Model/Layers/Objects/PolygonObject.cs
+++ b/src/DotTiled/Model/Layers/Objects/PolygonObject.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Numerics;
-namespace DotTiled.Model.Layers.Objects;
+namespace DotTiled.Model;
public class PolygonObject : Object
{
diff --git a/src/DotTiled/Model/Layers/Objects/PolylineObject.cs b/src/DotTiled/Model/Layers/Objects/PolylineObject.cs
index 03cd6b4..e97d017 100644
--- a/src/DotTiled/Model/Layers/Objects/PolylineObject.cs
+++ b/src/DotTiled/Model/Layers/Objects/PolylineObject.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Numerics;
-namespace DotTiled.Model.Layers.Objects;
+namespace DotTiled.Model;
public class PolylineObject : Object
{
diff --git a/src/DotTiled/Model/Layers/Objects/RectangleObject.cs b/src/DotTiled/Model/Layers/Objects/RectangleObject.cs
index ff64a76..4fad428 100644
--- a/src/DotTiled/Model/Layers/Objects/RectangleObject.cs
+++ b/src/DotTiled/Model/Layers/Objects/RectangleObject.cs
@@ -1,3 +1,3 @@
-namespace DotTiled.Model.Layers.Objects;
+namespace DotTiled.Model;
public class RectangleObject : Object { }
diff --git a/src/DotTiled/Model/Layers/Objects/TextObject.cs b/src/DotTiled/Model/Layers/Objects/TextObject.cs
index f39f84a..2072c7f 100644
--- a/src/DotTiled/Model/Layers/Objects/TextObject.cs
+++ b/src/DotTiled/Model/Layers/Objects/TextObject.cs
@@ -1,7 +1,6 @@
using System.Globalization;
-namespace DotTiled.Model.Layers.Objects;
-
+namespace DotTiled.Model;
public enum TextHorizontalAlignment
{
diff --git a/src/DotTiled/Model/Layers/Objects/TileObject.cs b/src/DotTiled/Model/Layers/Objects/TileObject.cs
index 992ac3c..dc52100 100644
--- a/src/DotTiled/Model/Layers/Objects/TileObject.cs
+++ b/src/DotTiled/Model/Layers/Objects/TileObject.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Layers.Objects;
+namespace DotTiled.Model;
public class TileObject : Object
{
diff --git a/src/DotTiled/Model/Layers/TileLayer.cs b/src/DotTiled/Model/Layers/TileLayer.cs
index 9002397..f314c1c 100644
--- a/src/DotTiled/Model/Layers/TileLayer.cs
+++ b/src/DotTiled/Model/Layers/TileLayer.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Layers;
+namespace DotTiled.Model;
public class TileLayer : BaseLayer
{
diff --git a/src/DotTiled/Model/Map.cs b/src/DotTiled/Model/Map.cs
index 3102567..c9c72dc 100644
--- a/src/DotTiled/Model/Map.cs
+++ b/src/DotTiled/Model/Map.cs
@@ -1,66 +1,205 @@
using System.Collections.Generic;
using System.Globalization;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Tilesets;
namespace DotTiled.Model;
+///
+/// Map orientation enumeration. The map orientation determines the alignment of the tiles in the map.
+///
public enum MapOrientation
{
+ ///
+ /// Orthogonal orientation. This is the typical top-down grid-based layout.
+ ///
Orthogonal,
+
+ ///
+ /// Isometric orientation. This is a type of axonometric projection where the tiles are shown as rhombuses, as seen from a side-on view.
+ ///
Isometric,
+
+ ///
+ /// Staggered orientation. This is an isometric projection with a side-on view where the tiles are arranged in a staggered grid.
+ ///
Staggered,
+
+ ///
+ /// Hexagonal orientation. This is a type of axial projection where the tiles are shown as hexagons, as seen from a top-down view.
+ ///
Hexagonal
}
+///
+/// Render order enumeration. The order in which tiles on tile layers are rendered.
+///
public enum RenderOrder
{
+ ///
+ /// Right-down render order. Starts at top-left and proceeds right then down.
+ ///
RightDown,
+
+ ///
+ /// Right-up render order. Starts at bottom-left and proceeds right then up.
+ ///
RightUp,
+
+ ///
+ /// Left-down render order. Starts at top-right and proceeds left then down.
+ ///
LeftDown,
+
+ ///
+ /// Left-up render order. Starts at bottom-right and proceeds left then up.
+ ///
LeftUp
}
+///
+/// Stagger axis enumeration. For staggered and hexagonal maps, determines which axis (X or Y) is staggered.
+///
public enum StaggerAxis
{
+ ///
+ /// X stagger axis.
+ ///
X,
+
+ ///
+ /// Y stagger axis.
+ ///
Y
}
+///
+/// Stagger index enumeration. For staggered and hexagonal maps, determines whether the "even" or "odd" indexes along the staggered axis are shifted.
+///
public enum StaggerIndex
{
+ ///
+ /// Even stagger index.
+ ///
Odd,
+
+ ///
+ /// Odd stagger index.
+ ///
Even
}
+///
+/// Represents a Tiled map.
+///
public class Map
{
- // Attributes
+ ///
+ /// The TMX format version. Is incremented to match minor Tiled releases.
+ ///
public required string Version { get; set; }
+
+ ///
+ /// The Tiled version used to save the file.
+ ///
public required string TiledVersion { get; set; }
+
+ ///
+ /// The class of this map.
+ ///
public string Class { get; set; } = "";
+
+ ///
+ /// Map orientation.
+ ///
public required MapOrientation Orientation { get; set; }
+
+ ///
+ /// The order in which tiles on tile layers are rendered.
+ ///
public RenderOrder RenderOrder { get; set; } = RenderOrder.RightDown;
+
+ ///
+ /// The compression level to use for tile layer data (defaults to -1, which means to use the algorithm default).
+ /// Typically only useful for parsing, but may be interesting for certain use cases.
+ ///
public int CompressionLevel { get; set; } = -1;
+
+ ///
+ /// The width of the map in tiles.
+ ///
public required uint Width { get; set; }
+
+ ///
+ /// The height of the map in tiles.
+ ///
public required uint Height { get; set; }
+
+ ///
+ /// The width of a tile.
+ ///
public required uint TileWidth { get; set; }
+
+ ///
+ /// The height of a tile.
+ ///
public required uint TileHeight { get; set; }
+
+ ///
+ /// Only for hexagonal maps. Determines the width or height (depending on the staggered axis) of the tile's edge, in pixels.
+ ///
public uint? HexSideLength { get; set; }
+
+ ///
+ /// For staggered and hexagonal maps, determines which axis (X or Y) is staggered.
+ ///
public StaggerAxis? StaggerAxis { get; set; }
+
+ ///
+ /// For staggered and hexagonal maps, determines whether the "even" or "odd" indexes along the staggered axis are shifted.
+ ///
public StaggerIndex? StaggerIndex { get; set; }
+
+ ///
+ /// X coordinate of the parallax origin in pixels.
+ ///
public float ParallaxOriginX { get; set; } = 0.0f;
+
+ ///
+ /// Y coordinate of the parallax origin in pixels.
+ ///
public float ParallaxOriginY { get; set; } = 0.0f;
+
+ ///
+ /// The background color of the map.
+ ///
public Color BackgroundColor { get; set; } = Color.Parse("#00000000", CultureInfo.InvariantCulture);
+
+ ///
+ /// Stores the next available ID for new layers. This number is used to prevent reuse of the same ID after layers have been removed.
+ ///
public required uint NextLayerID { get; set; }
+
+ ///
+ /// Stores the next available ID for new objects. This number is used to prevent reuse of the same ID after objects have been removed.
+ ///
public required uint NextObjectID { get; set; }
+
+ ///
+ /// Whether this map is infinite. An infinite map has no fixed size and can grow in all directions. Its layer data is stored in chunks.
+ ///
public bool Infinite { get; set; } = false;
- // At most one of
+ ///
+ /// Map properties.
+ ///
public Dictionary? Properties { get; set; }
- // Any number of
+ ///
+ /// List of tilesets used by the map.
+ ///
public List Tilesets { get; set; } = [];
+
+ ///
+ /// Hierarchical list of layers. is a layer type which can contain sub-layers to create a hierarchy.
+ ///
public List Layers { get; set; } = [];
}
diff --git a/src/DotTiled/Model/Properties/BoolProperty.cs b/src/DotTiled/Model/Properties/BoolProperty.cs
index 6360a3a..af57a91 100644
--- a/src/DotTiled/Model/Properties/BoolProperty.cs
+++ b/src/DotTiled/Model/Properties/BoolProperty.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Properties;
+namespace DotTiled.Model;
public class BoolProperty : IProperty
{
diff --git a/src/DotTiled/Model/Properties/ClassProperty.cs b/src/DotTiled/Model/Properties/ClassProperty.cs
index e46389f..8117e7f 100644
--- a/src/DotTiled/Model/Properties/ClassProperty.cs
+++ b/src/DotTiled/Model/Properties/ClassProperty.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;
-namespace DotTiled.Model.Properties;
+namespace DotTiled.Model;
public class ClassProperty : IProperty
{
diff --git a/src/DotTiled/Model/Properties/ColorProperty.cs b/src/DotTiled/Model/Properties/ColorProperty.cs
index 06d8fc1..83e5852 100644
--- a/src/DotTiled/Model/Properties/ColorProperty.cs
+++ b/src/DotTiled/Model/Properties/ColorProperty.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Properties;
+namespace DotTiled.Model;
public class ColorProperty : IProperty
{
diff --git a/src/DotTiled/Model/Properties/CustomTypes/CustomClassDefinition.cs b/src/DotTiled/Model/Properties/CustomTypes/CustomClassDefinition.cs
index c080e2a..888d268 100644
--- a/src/DotTiled/Model/Properties/CustomTypes/CustomClassDefinition.cs
+++ b/src/DotTiled/Model/Properties/CustomTypes/CustomClassDefinition.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-namespace DotTiled.Model.Properties.CustomTypes;
+namespace DotTiled.Model;
[Flags]
public enum CustomClassUseAs
diff --git a/src/DotTiled/Model/Properties/CustomTypes/CustomEnumDefinition.cs b/src/DotTiled/Model/Properties/CustomTypes/CustomEnumDefinition.cs
index 9d15b7d..602eef0 100644
--- a/src/DotTiled/Model/Properties/CustomTypes/CustomEnumDefinition.cs
+++ b/src/DotTiled/Model/Properties/CustomTypes/CustomEnumDefinition.cs
@@ -1,6 +1,6 @@
using System.Collections.Generic;
-namespace DotTiled.Model.Properties.CustomTypes;
+namespace DotTiled.Model;
public enum CustomEnumStorageType
{
diff --git a/src/DotTiled/Model/Properties/CustomTypes/CustomTypeDefinition.cs b/src/DotTiled/Model/Properties/CustomTypes/CustomTypeDefinition.cs
index f535215..5670ebe 100644
--- a/src/DotTiled/Model/Properties/CustomTypes/CustomTypeDefinition.cs
+++ b/src/DotTiled/Model/Properties/CustomTypes/CustomTypeDefinition.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Properties.CustomTypes;
+namespace DotTiled.Model;
public abstract class CustomTypeDefinition
{
diff --git a/src/DotTiled/Model/Properties/FileProperty.cs b/src/DotTiled/Model/Properties/FileProperty.cs
index 42b9d15..f6b1314 100644
--- a/src/DotTiled/Model/Properties/FileProperty.cs
+++ b/src/DotTiled/Model/Properties/FileProperty.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Properties;
+namespace DotTiled.Model;
public class FileProperty : IProperty
{
diff --git a/src/DotTiled/Model/Properties/FloatProperty.cs b/src/DotTiled/Model/Properties/FloatProperty.cs
index ccb18ae..fbbc797 100644
--- a/src/DotTiled/Model/Properties/FloatProperty.cs
+++ b/src/DotTiled/Model/Properties/FloatProperty.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Properties;
+namespace DotTiled.Model;
public class FloatProperty : IProperty
{
diff --git a/src/DotTiled/Model/Properties/IProperty.cs b/src/DotTiled/Model/Properties/IProperty.cs
index 0414c3c..925eff0 100644
--- a/src/DotTiled/Model/Properties/IProperty.cs
+++ b/src/DotTiled/Model/Properties/IProperty.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Properties;
+namespace DotTiled.Model;
public interface IProperty
{
diff --git a/src/DotTiled/Model/Properties/IntProperty.cs b/src/DotTiled/Model/Properties/IntProperty.cs
index cfaf7d0..cb4fe43 100644
--- a/src/DotTiled/Model/Properties/IntProperty.cs
+++ b/src/DotTiled/Model/Properties/IntProperty.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Properties;
+namespace DotTiled.Model;
public class IntProperty : IProperty
{
diff --git a/src/DotTiled/Model/Properties/ObjectProperty.cs b/src/DotTiled/Model/Properties/ObjectProperty.cs
index 5f37607..ee2b02d 100644
--- a/src/DotTiled/Model/Properties/ObjectProperty.cs
+++ b/src/DotTiled/Model/Properties/ObjectProperty.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Properties;
+namespace DotTiled.Model;
public class ObjectProperty : IProperty
{
diff --git a/src/DotTiled/Model/Properties/PropertyType.cs b/src/DotTiled/Model/Properties/PropertyType.cs
index bb01960..88a1cda 100644
--- a/src/DotTiled/Model/Properties/PropertyType.cs
+++ b/src/DotTiled/Model/Properties/PropertyType.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Properties;
+namespace DotTiled.Model;
public enum PropertyType
{
diff --git a/src/DotTiled/Model/Properties/StringProperty.cs b/src/DotTiled/Model/Properties/StringProperty.cs
index 9842ca4..965d08b 100644
--- a/src/DotTiled/Model/Properties/StringProperty.cs
+++ b/src/DotTiled/Model/Properties/StringProperty.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Properties;
+namespace DotTiled.Model;
public class StringProperty : IProperty
{
diff --git a/src/DotTiled/Model/Template.cs b/src/DotTiled/Model/Template.cs
index 834f8d8..d8cee95 100644
--- a/src/DotTiled/Model/Template.cs
+++ b/src/DotTiled/Model/Template.cs
@@ -1,11 +1,17 @@
-using DotTiled.Model.Layers.Objects;
-using DotTiled.Model.Tilesets;
-
namespace DotTiled.Model;
+///
+/// Represents a Tiled template. A template is a reusable object that can be placed in an inside the Tiled editor.
+///
public class Template
{
- // At most one of (if the template is a tile object)
+ ///
+ /// If the template represents a tile object, this property will contain the tileset that the tile belongs to.
+ ///
public Tileset? Tileset { get; set; }
+
+ ///
+ /// The object that this template represents.
+ ///
public required Object Object { get; set; }
}
diff --git a/src/DotTiled/Model/Tilesets/Frame.cs b/src/DotTiled/Model/Tilesets/Frame.cs
index 8762423..f57f579 100644
--- a/src/DotTiled/Model/Tilesets/Frame.cs
+++ b/src/DotTiled/Model/Tilesets/Frame.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Tilesets;
+namespace DotTiled.Model;
public class Frame
{
diff --git a/src/DotTiled/Model/Tilesets/Grid.cs b/src/DotTiled/Model/Tilesets/Grid.cs
index 81d5e06..d98ad6f 100644
--- a/src/DotTiled/Model/Tilesets/Grid.cs
+++ b/src/DotTiled/Model/Tilesets/Grid.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Tilesets;
+namespace DotTiled.Model;
public enum GridOrientation
{
diff --git a/src/DotTiled/Model/Tilesets/Image.cs b/src/DotTiled/Model/Tilesets/Image.cs
index e5ea154..d776bb8 100644
--- a/src/DotTiled/Model/Tilesets/Image.cs
+++ b/src/DotTiled/Model/Tilesets/Image.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Tilesets;
+namespace DotTiled.Model;
public enum ImageFormat
{
diff --git a/src/DotTiled/Model/Tilesets/Tile.cs b/src/DotTiled/Model/Tilesets/Tile.cs
index 55669ee..26c6057 100644
--- a/src/DotTiled/Model/Tilesets/Tile.cs
+++ b/src/DotTiled/Model/Tilesets/Tile.cs
@@ -1,8 +1,6 @@
using System.Collections.Generic;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Properties;
-namespace DotTiled.Model.Tilesets;
+namespace DotTiled.Model;
public class Tile
{
diff --git a/src/DotTiled/Model/Tilesets/TileOffset.cs b/src/DotTiled/Model/Tilesets/TileOffset.cs
index cbe9111..2b2e620 100644
--- a/src/DotTiled/Model/Tilesets/TileOffset.cs
+++ b/src/DotTiled/Model/Tilesets/TileOffset.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Tilesets;
+namespace DotTiled.Model;
public class TileOffset
{
diff --git a/src/DotTiled/Model/Tilesets/Tileset.cs b/src/DotTiled/Model/Tilesets/Tileset.cs
index 15bd56b..639fe62 100644
--- a/src/DotTiled/Model/Tilesets/Tileset.cs
+++ b/src/DotTiled/Model/Tilesets/Tileset.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
-using DotTiled.Model.Properties;
-namespace DotTiled.Model.Tilesets;
+namespace DotTiled.Model;
public enum ObjectAlignment
{
diff --git a/src/DotTiled/Model/Tilesets/Transformations.cs b/src/DotTiled/Model/Tilesets/Transformations.cs
index 83187a7..1a84549 100644
--- a/src/DotTiled/Model/Tilesets/Transformations.cs
+++ b/src/DotTiled/Model/Tilesets/Transformations.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Tilesets;
+namespace DotTiled.Model;
public class Transformations
{
diff --git a/src/DotTiled/Model/Tilesets/WangColor.cs b/src/DotTiled/Model/Tilesets/WangColor.cs
index c13b0da..d3a0328 100644
--- a/src/DotTiled/Model/Tilesets/WangColor.cs
+++ b/src/DotTiled/Model/Tilesets/WangColor.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
-using DotTiled.Model.Properties;
-namespace DotTiled.Model.Tilesets;
+namespace DotTiled.Model;
public class WangColor
{
diff --git a/src/DotTiled/Model/Tilesets/WangTile.cs b/src/DotTiled/Model/Tilesets/WangTile.cs
index 488a12a..d526d71 100644
--- a/src/DotTiled/Model/Tilesets/WangTile.cs
+++ b/src/DotTiled/Model/Tilesets/WangTile.cs
@@ -1,4 +1,4 @@
-namespace DotTiled.Model.Tilesets;
+namespace DotTiled.Model;
public class WangTile
{
diff --git a/src/DotTiled/Model/Tilesets/Wangset.cs b/src/DotTiled/Model/Tilesets/Wangset.cs
index 6101347..653f43f 100644
--- a/src/DotTiled/Model/Tilesets/Wangset.cs
+++ b/src/DotTiled/Model/Tilesets/Wangset.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
-using DotTiled.Model.Properties;
-namespace DotTiled.Model.Tilesets;
+namespace DotTiled.Model;
public class Wangset
{
diff --git a/src/DotTiled/Serialization/Helpers.cs b/src/DotTiled/Serialization/Helpers.cs
index abfba09..fe401ba 100644
--- a/src/DotTiled/Serialization/Helpers.cs
+++ b/src/DotTiled/Serialization/Helpers.cs
@@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Tilesets;
+using DotTiled.Model;
+using DotTiled.Model;
+using DotTiled.Model;
namespace DotTiled.Serialization;
diff --git a/src/DotTiled/Serialization/ITilesetReader.cs b/src/DotTiled/Serialization/ITilesetReader.cs
index fa4a94c..803ea8e 100644
--- a/src/DotTiled/Serialization/ITilesetReader.cs
+++ b/src/DotTiled/Serialization/ITilesetReader.cs
@@ -1,5 +1,5 @@
using System;
-using DotTiled.Model.Tilesets;
+using DotTiled.Model;
namespace DotTiled.Serialization;
diff --git a/src/DotTiled/Serialization/Tmj/TjTemplateReader.cs b/src/DotTiled/Serialization/Tmj/TjTemplateReader.cs
index 69747bb..a10a1f3 100644
--- a/src/DotTiled/Serialization/Tmj/TjTemplateReader.cs
+++ b/src/DotTiled/Serialization/Tmj/TjTemplateReader.cs
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using DotTiled.Model;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
namespace DotTiled.Serialization.Tmj;
diff --git a/src/DotTiled/Serialization/Tmj/Tmj.Data.cs b/src/DotTiled/Serialization/Tmj/Tmj.Data.cs
index ac3d30b..2edb93f 100644
--- a/src/DotTiled/Serialization/Tmj/Tmj.Data.cs
+++ b/src/DotTiled/Serialization/Tmj/Tmj.Data.cs
@@ -5,7 +5,7 @@ using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Text.Json;
-using DotTiled.Model.Layers;
+using DotTiled.Model;
namespace DotTiled.Serialization.Tmj;
diff --git a/src/DotTiled/Serialization/Tmj/Tmj.Group.cs b/src/DotTiled/Serialization/Tmj/Tmj.Group.cs
index 159d892..796458b 100644
--- a/src/DotTiled/Serialization/Tmj/Tmj.Group.cs
+++ b/src/DotTiled/Serialization/Tmj/Tmj.Group.cs
@@ -4,9 +4,6 @@ using System.Globalization;
using System.Numerics;
using System.Text.Json;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Properties.CustomTypes;
namespace DotTiled.Serialization.Tmj;
diff --git a/src/DotTiled/Serialization/Tmj/Tmj.ImageLayer.cs b/src/DotTiled/Serialization/Tmj/Tmj.ImageLayer.cs
index e3d6112..70d9ce4 100644
--- a/src/DotTiled/Serialization/Tmj/Tmj.ImageLayer.cs
+++ b/src/DotTiled/Serialization/Tmj/Tmj.ImageLayer.cs
@@ -4,10 +4,7 @@ using System.Globalization;
using System.Numerics;
using System.Text.Json;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
+using DotTiled.Model;
namespace DotTiled.Serialization.Tmj;
diff --git a/src/DotTiled/Serialization/Tmj/Tmj.Layer.cs b/src/DotTiled/Serialization/Tmj/Tmj.Layer.cs
index d81ce17..fb02fe5 100644
--- a/src/DotTiled/Serialization/Tmj/Tmj.Layer.cs
+++ b/src/DotTiled/Serialization/Tmj/Tmj.Layer.cs
@@ -4,8 +4,6 @@ using System.Globalization;
using System.Numerics;
using System.Text.Json;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Properties.CustomTypes;
namespace DotTiled.Serialization.Tmj;
diff --git a/src/DotTiled/Serialization/Tmj/Tmj.Map.cs b/src/DotTiled/Serialization/Tmj/Tmj.Map.cs
index e27dfed..642d8f4 100644
--- a/src/DotTiled/Serialization/Tmj/Tmj.Map.cs
+++ b/src/DotTiled/Serialization/Tmj/Tmj.Map.cs
@@ -5,10 +5,6 @@ using System.IO;
using System.Linq;
using System.Text.Json;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
namespace DotTiled.Serialization.Tmj;
diff --git a/src/DotTiled/Serialization/Tmj/Tmj.ObjectLayer.cs b/src/DotTiled/Serialization/Tmj/Tmj.ObjectLayer.cs
index 0662fc9..af0449b 100644
--- a/src/DotTiled/Serialization/Tmj/Tmj.ObjectLayer.cs
+++ b/src/DotTiled/Serialization/Tmj/Tmj.ObjectLayer.cs
@@ -4,10 +4,6 @@ using System.Globalization;
using System.Numerics;
using System.Text.Json;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Layers.Objects;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Properties.CustomTypes;
namespace DotTiled.Serialization.Tmj;
diff --git a/src/DotTiled/Serialization/Tmj/Tmj.Properties.cs b/src/DotTiled/Serialization/Tmj/Tmj.Properties.cs
index 1ef4944..28aad66 100644
--- a/src/DotTiled/Serialization/Tmj/Tmj.Properties.cs
+++ b/src/DotTiled/Serialization/Tmj/Tmj.Properties.cs
@@ -4,8 +4,6 @@ using System.IO;
using System.Linq;
using System.Text.Json;
using DotTiled.Model;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Properties.CustomTypes;
namespace DotTiled.Serialization.Tmj;
diff --git a/src/DotTiled/Serialization/Tmj/Tmj.Template.cs b/src/DotTiled/Serialization/Tmj/Tmj.Template.cs
index 65d6f87..a9a8766 100644
--- a/src/DotTiled/Serialization/Tmj/Tmj.Template.cs
+++ b/src/DotTiled/Serialization/Tmj/Tmj.Template.cs
@@ -4,8 +4,6 @@ using System.Globalization;
using System.Numerics;
using System.Text.Json;
using DotTiled.Model;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
namespace DotTiled.Serialization.Tmj;
diff --git a/src/DotTiled/Serialization/Tmj/Tmj.TileLayer.cs b/src/DotTiled/Serialization/Tmj/Tmj.TileLayer.cs
index d2fd53d..3711eb2 100644
--- a/src/DotTiled/Serialization/Tmj/Tmj.TileLayer.cs
+++ b/src/DotTiled/Serialization/Tmj/Tmj.TileLayer.cs
@@ -4,9 +4,6 @@ using System.Globalization;
using System.Numerics;
using System.Text.Json;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Properties.CustomTypes;
namespace DotTiled.Serialization.Tmj;
diff --git a/src/DotTiled/Serialization/Tmj/Tmj.Tileset.cs b/src/DotTiled/Serialization/Tmj/Tmj.Tileset.cs
index 8b206c9..0d6dfc7 100644
--- a/src/DotTiled/Serialization/Tmj/Tmj.Tileset.cs
+++ b/src/DotTiled/Serialization/Tmj/Tmj.Tileset.cs
@@ -6,10 +6,6 @@ using System.IO.Compression;
using System.Linq;
using System.Text.Json;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
namespace DotTiled.Serialization.Tmj;
diff --git a/src/DotTiled/Serialization/Tmj/TmjMapReader.cs b/src/DotTiled/Serialization/Tmj/TmjMapReader.cs
index 3eb1df0..23d9754 100644
--- a/src/DotTiled/Serialization/Tmj/TmjMapReader.cs
+++ b/src/DotTiled/Serialization/Tmj/TmjMapReader.cs
@@ -4,8 +4,6 @@ using System.IO;
using System.Text;
using System.Text.Json;
using DotTiled.Model;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
namespace DotTiled.Serialization.Tmj;
diff --git a/src/DotTiled/Serialization/Tmj/TsjTilesetReader.cs b/src/DotTiled/Serialization/Tmj/TsjTilesetReader.cs
index a41adfe..7ddae3e 100644
--- a/src/DotTiled/Serialization/Tmj/TsjTilesetReader.cs
+++ b/src/DotTiled/Serialization/Tmj/TsjTilesetReader.cs
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using DotTiled.Model;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
namespace DotTiled.Serialization.Tmj;
diff --git a/src/DotTiled/Serialization/Tmx/Tmx.Chunk.cs b/src/DotTiled/Serialization/Tmx/Tmx.Chunk.cs
index d0db01f..b42ebb0 100644
--- a/src/DotTiled/Serialization/Tmx/Tmx.Chunk.cs
+++ b/src/DotTiled/Serialization/Tmx/Tmx.Chunk.cs
@@ -1,5 +1,5 @@
using System.Xml;
-using DotTiled.Model.Layers;
+using DotTiled.Model;
namespace DotTiled.Serialization.Tmx;
diff --git a/src/DotTiled/Serialization/Tmx/Tmx.Data.cs b/src/DotTiled/Serialization/Tmx/Tmx.Data.cs
index 5d55ba4..77f7d6a 100644
--- a/src/DotTiled/Serialization/Tmx/Tmx.Data.cs
+++ b/src/DotTiled/Serialization/Tmx/Tmx.Data.cs
@@ -4,7 +4,7 @@ using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Xml;
-using DotTiled.Model.Layers;
+using DotTiled.Model;
namespace DotTiled.Serialization.Tmx;
diff --git a/src/DotTiled/Serialization/Tmx/Tmx.Map.cs b/src/DotTiled/Serialization/Tmx/Tmx.Map.cs
index 2152852..e7a5e35 100644
--- a/src/DotTiled/Serialization/Tmx/Tmx.Map.cs
+++ b/src/DotTiled/Serialization/Tmx/Tmx.Map.cs
@@ -4,10 +4,6 @@ using System.Globalization;
using System.Linq;
using System.Xml;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
namespace DotTiled.Serialization.Tmx;
diff --git a/src/DotTiled/Serialization/Tmx/Tmx.ObjectLayer.cs b/src/DotTiled/Serialization/Tmx/Tmx.ObjectLayer.cs
index 5f5bda0..523b224 100644
--- a/src/DotTiled/Serialization/Tmx/Tmx.ObjectLayer.cs
+++ b/src/DotTiled/Serialization/Tmx/Tmx.ObjectLayer.cs
@@ -5,11 +5,6 @@ using System.Linq;
using System.Numerics;
using System.Xml;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Layers.Objects;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
namespace DotTiled.Serialization.Tmx;
diff --git a/src/DotTiled/Serialization/Tmx/Tmx.Properties.cs b/src/DotTiled/Serialization/Tmx/Tmx.Properties.cs
index 7f62358..3d5b6c4 100644
--- a/src/DotTiled/Serialization/Tmx/Tmx.Properties.cs
+++ b/src/DotTiled/Serialization/Tmx/Tmx.Properties.cs
@@ -2,8 +2,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Xml;
using DotTiled.Model;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Properties.CustomTypes;
namespace DotTiled.Serialization.Tmx;
diff --git a/src/DotTiled/Serialization/Tmx/Tmx.TileLayer.cs b/src/DotTiled/Serialization/Tmx/Tmx.TileLayer.cs
index 41e720b..8b972a3 100644
--- a/src/DotTiled/Serialization/Tmx/Tmx.TileLayer.cs
+++ b/src/DotTiled/Serialization/Tmx/Tmx.TileLayer.cs
@@ -3,10 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Xml;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
namespace DotTiled.Serialization.Tmx;
diff --git a/src/DotTiled/Serialization/Tmx/Tmx.Tileset.cs b/src/DotTiled/Serialization/Tmx/Tmx.Tileset.cs
index 5d8aac6..6e43455 100644
--- a/src/DotTiled/Serialization/Tmx/Tmx.Tileset.cs
+++ b/src/DotTiled/Serialization/Tmx/Tmx.Tileset.cs
@@ -4,10 +4,6 @@ using System.IO;
using System.Linq;
using System.Xml;
using DotTiled.Model;
-using DotTiled.Model.Layers;
-using DotTiled.Model.Properties;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
namespace DotTiled.Serialization.Tmx;
diff --git a/src/DotTiled/Serialization/Tmx/TmxMapReader.cs b/src/DotTiled/Serialization/Tmx/TmxMapReader.cs
index f9228b4..091f161 100644
--- a/src/DotTiled/Serialization/Tmx/TmxMapReader.cs
+++ b/src/DotTiled/Serialization/Tmx/TmxMapReader.cs
@@ -2,8 +2,6 @@ using System;
using System.Collections.Generic;
using System.Xml;
using DotTiled.Model;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
namespace DotTiled.Serialization.Tmx;
diff --git a/src/DotTiled/Serialization/Tmx/TsxTilesetReader.cs b/src/DotTiled/Serialization/Tmx/TsxTilesetReader.cs
index f7a1565..0cc4e2f 100644
--- a/src/DotTiled/Serialization/Tmx/TsxTilesetReader.cs
+++ b/src/DotTiled/Serialization/Tmx/TsxTilesetReader.cs
@@ -2,8 +2,6 @@ using System;
using System.Collections.Generic;
using System.Xml;
using DotTiled.Model;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
namespace DotTiled.Serialization.Tmx;
diff --git a/src/DotTiled/Serialization/Tmx/TxTemplateReader.cs b/src/DotTiled/Serialization/Tmx/TxTemplateReader.cs
index 3fa6c69..e640dd8 100644
--- a/src/DotTiled/Serialization/Tmx/TxTemplateReader.cs
+++ b/src/DotTiled/Serialization/Tmx/TxTemplateReader.cs
@@ -2,8 +2,6 @@ using System;
using System.Collections.Generic;
using System.Xml;
using DotTiled.Model;
-using DotTiled.Model.Properties.CustomTypes;
-using DotTiled.Model.Tilesets;
namespace DotTiled.Serialization.Tmx;