diff options
Diffstat (limited to 'Plugins/MonoGame.Extended/source/MonoGame.Extended.Tiled/TiledMapTilesetTile.cs')
-rw-r--r-- | Plugins/MonoGame.Extended/source/MonoGame.Extended.Tiled/TiledMapTilesetTile.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Plugins/MonoGame.Extended/source/MonoGame.Extended.Tiled/TiledMapTilesetTile.cs b/Plugins/MonoGame.Extended/source/MonoGame.Extended.Tiled/TiledMapTilesetTile.cs new file mode 100644 index 0000000..e378aa3 --- /dev/null +++ b/Plugins/MonoGame.Extended/source/MonoGame.Extended.Tiled/TiledMapTilesetTile.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic; +using System.Diagnostics; +using Microsoft.Xna.Framework.Graphics; + +namespace MonoGame.Extended.Tiled +{ + [DebuggerDisplay("{LocalTileIdentifier}: Type: {Type}, Properties: {Properties.Count}, Objects: {Objects.Count}")] + public class TiledMapTilesetTile + { + // For remove libraries + public TiledMapTilesetTile(int localTileIdentifier, string type = null, + TiledMapObject[] objects = null) + { + LocalTileIdentifier = localTileIdentifier; + Type = type; + Objects = objects != null ? new List<TiledMapObject>(objects) : new List<TiledMapObject>(); + Properties = new TiledMapProperties(); + } + + public TiledMapTilesetTile(int localTileIdentifier, string type = null, + TiledMapObject[] objects = null, Texture2D texture = null) + { + Texture = texture; + LocalTileIdentifier = localTileIdentifier; + Type = type; + Objects = objects != null ? new List<TiledMapObject>(objects) : new List<TiledMapObject>(); + Properties = new TiledMapProperties(); + } + + public int LocalTileIdentifier { get; } + public string Type { get; } + public TiledMapProperties Properties { get; } + public List<TiledMapObject> Objects { get; } + public Texture2D Texture { get; } + } +} |