From acea7b2e728787a0d83bbf83c8c1f042d2c32e7e Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Mon, 3 Jun 2024 10:15:45 +0800 Subject: + plugins project --- .../MonoGame.Extended.Tiled/TiledMapTilesetTile.cs | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Plugins/MonoGame.Extended/source/MonoGame.Extended.Tiled/TiledMapTilesetTile.cs (limited to 'Plugins/MonoGame.Extended/source/MonoGame.Extended.Tiled/TiledMapTilesetTile.cs') 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(objects) : new List(); + 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(objects) : new List(); + Properties = new TiledMapProperties(); + } + + public int LocalTileIdentifier { get; } + public string Type { get; } + public TiledMapProperties Properties { get; } + public List Objects { get; } + public Texture2D Texture { get; } + } +} -- cgit v1.1-26-g67d0