|
@ -6,3 +6,10 @@ end_of_line = lf
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
indent_style = space
|
indent_style = space
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[.github/**/*.yml]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
|
41
.github/workflows/deploy-docs.yml
vendored
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||||
|
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
||||||
|
concurrency:
|
||||||
|
group: "pages"
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy-docs:
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup .NET
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: 8.0.x
|
||||||
|
- name: Setup DocFX
|
||||||
|
run: dotnet tool update -g docfx
|
||||||
|
- name: Build docs
|
||||||
|
run: make docs-build
|
||||||
|
- name: Upload docs
|
||||||
|
uses: actions/upload-pages-artifact@v3
|
||||||
|
with:
|
||||||
|
path: docs/_site
|
||||||
|
- name: Deploy docs
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
8
.github/workflows/tests.yml
vendored
|
@ -5,7 +5,7 @@ on:
|
||||||
- dev
|
- dev
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -14,9 +14,9 @@ jobs:
|
||||||
with:
|
with:
|
||||||
dotnet-version: 8.0.x
|
dotnet-version: 8.0.x
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore
|
run: dotnet restore src/DotTiled.sln
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build --no-restore
|
run: dotnet build --no-restore src/DotTiled.sln
|
||||||
- name: Test
|
- name: Test
|
||||||
run: dotnet test --no-build --verbosity normal
|
run: dotnet test --no-build --verbosity normal src/DotTiled.sln
|
||||||
|
|
5
.gitignore
vendored
|
@ -3,6 +3,11 @@
|
||||||
##
|
##
|
||||||
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||||
|
|
||||||
|
# Generated docs
|
||||||
|
docs/_site/
|
||||||
|
docs/api/
|
||||||
|
docs/index.md
|
||||||
|
|
||||||
# User-specific files
|
# User-specific files
|
||||||
*.rsuser
|
*.rsuser
|
||||||
*.suo
|
*.suo
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
namespace DotTiled;
|
|
||||||
|
|
||||||
public class PointObject : Object { }
|
|
|
@ -1,13 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Globalization;
|
|
||||||
using System.IO;
|
|
||||||
using System.IO.Compression;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text.Json;
|
|
||||||
|
|
||||||
namespace DotTiled;
|
|
||||||
|
|
||||||
internal partial class Tmj
|
|
||||||
{
|
|
||||||
}
|
|
15
FUNDING.yml
|
@ -1,15 +0,0 @@
|
||||||
# These are supported funding model platforms
|
|
||||||
|
|
||||||
github: [dcronqvist]
|
|
||||||
patreon: # Replace with a single Patreon username
|
|
||||||
open_collective: # Replace with a single Open Collective username
|
|
||||||
ko_fi: # Replace with a single Ko-fi username
|
|
||||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
||||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
||||||
liberapay: # Replace with a single Liberapay username
|
|
||||||
issuehunt: # Replace with a single IssueHunt username
|
|
||||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
||||||
polar: # Replace with a single Polar username
|
|
||||||
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
|
||||||
thanks_dev: # Replace with a single thanks.dev username
|
|
||||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
9
Makefile
|
@ -1,5 +1,12 @@
|
||||||
test:
|
test:
|
||||||
dotnet test
|
dotnet test src/DotTiled.sln
|
||||||
|
|
||||||
|
docs-serve: docs-build
|
||||||
|
docfx docs/docfx.json --serve
|
||||||
|
|
||||||
|
docs-build:
|
||||||
|
cp README.md docs/index.md
|
||||||
|
docfx docs/docfx.json
|
||||||
|
|
||||||
BENCHMARK_SOURCES = DotTiled.Benchmark/Program.cs DotTiled.Benchmark/DotTiled.Benchmark.csproj
|
BENCHMARK_SOURCES = DotTiled.Benchmark/Program.cs DotTiled.Benchmark/DotTiled.Benchmark.csproj
|
||||||
BENCHMARK_OUTPUTDIR = DotTiled.Benchmark/BenchmarkDotNet.Artifacts
|
BENCHMARK_OUTPUTDIR = DotTiled.Benchmark/BenchmarkDotNet.Artifacts
|
||||||
|
|
|
@ -8,7 +8,6 @@ DotTiled is designed to be a lightweight and efficient library that provides a s
|
||||||
|
|
||||||
- [Alternative libraries and comparison + benchmarks](#alternative-libraries-and-comparison)
|
- [Alternative libraries and comparison + benchmarks](#alternative-libraries-and-comparison)
|
||||||
- [Feature coverage comparison](#feature-coverage-comparison)
|
- [Feature coverage comparison](#feature-coverage-comparison)
|
||||||
- [Quickstart](#quickstart)
|
|
||||||
- [Installing DotTiled](#installing-dottiled)
|
- [Installing DotTiled](#installing-dottiled)
|
||||||
|
|
||||||
# Alternative libraries and comparison
|
# Alternative libraries and comparison
|
||||||
|
@ -74,9 +73,7 @@ Below is a comparison of the feature coverage of DotTiled and other similar libr
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> ✅ Full support. ⚠️ Partial support, see respective library for details about supported features. ❌ No support.
|
> ✅ Full support. ⚠️ Partial support, see respective library for details about supported features. ❌ No support.
|
||||||
|
|
||||||
# Quickstart
|
# Installing DotTiled
|
||||||
|
|
||||||
### Installing DotTiled
|
|
||||||
|
|
||||||
DotTiled is available as a NuGet package. You can install it by using the NuGet Package Manager UI in Visual Studio, or equivalent, or using the following command for the .NET CLI:
|
DotTiled is available as a NuGet package. You can install it by using the NuGet Package Manager UI in Visual Studio, or equivalent, or using the following command for the .NET CLI:
|
||||||
|
|
||||||
|
|
46
docs/docfx.json
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
{
|
||||||
|
"metadata": [
|
||||||
|
{
|
||||||
|
"src": [
|
||||||
|
{
|
||||||
|
"src": "../src",
|
||||||
|
"files": [
|
||||||
|
"DotTiled/DotTiled.csproj"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dest": "api"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"build": {
|
||||||
|
"content": [
|
||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"**/*.{md,yml}"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"_site/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"resource": [
|
||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"images/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"output": "_site",
|
||||||
|
"template": [
|
||||||
|
"default",
|
||||||
|
"modern",
|
||||||
|
"template"
|
||||||
|
],
|
||||||
|
"globalMetadata": {
|
||||||
|
"_appName": "DotTiled",
|
||||||
|
"_appTitle": "DotTiled",
|
||||||
|
"_enableSearch": true,
|
||||||
|
"pdf": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1
docs/docs/loading-a-map.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Loading a map
|
1
docs/docs/quickstart.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# Quick Start
|
6
docs/docs/toc.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
- name: Introduction
|
||||||
|
- href: ../index.md
|
||||||
|
- href: quickstart.md
|
||||||
|
|
||||||
|
- name: Essentials
|
||||||
|
- href: loading-a-map.md
|
4
docs/template/public/main.css
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
body {
|
||||||
|
--bs-link-color-rgb: 66, 184, 131 !important;
|
||||||
|
--bs-link-hover-color-rgb: 64, 180, 128 !important;
|
||||||
|
}
|
4
docs/toc.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
- name: Docs
|
||||||
|
href: docs/
|
||||||
|
- name: API
|
||||||
|
href: api/
|
|
@ -39,19 +39,19 @@ namespace MyBenchmarks
|
||||||
|
|
||||||
[BenchmarkCategory("MapFromInMemoryTmxString")]
|
[BenchmarkCategory("MapFromInMemoryTmxString")]
|
||||||
[Benchmark(Baseline = true, Description = "DotTiled")]
|
[Benchmark(Baseline = true, Description = "DotTiled")]
|
||||||
public DotTiled.Map LoadWithDotTiledFromInMemoryTmxString()
|
public DotTiled.Model.Map LoadWithDotTiledFromInMemoryTmxString()
|
||||||
{
|
{
|
||||||
using var stringReader = new StringReader(_tmxContents);
|
using var stringReader = new StringReader(_tmxContents);
|
||||||
using var xmlReader = XmlReader.Create(stringReader);
|
using var xmlReader = XmlReader.Create(stringReader);
|
||||||
using var mapReader = new DotTiled.TmxMapReader(xmlReader, _ => throw new Exception(), _ => throw new Exception(), []);
|
using var mapReader = new DotTiled.Serialization.Tmx.TmxMapReader(xmlReader, _ => throw new Exception(), _ => throw new Exception(), []);
|
||||||
return mapReader.ReadMap();
|
return mapReader.ReadMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
[BenchmarkCategory("MapFromInMemoryTmjString")]
|
[BenchmarkCategory("MapFromInMemoryTmjString")]
|
||||||
[Benchmark(Baseline = true, Description = "DotTiled")]
|
[Benchmark(Baseline = true, Description = "DotTiled")]
|
||||||
public DotTiled.Map LoadWithDotTiledFromInMemoryTmjString()
|
public DotTiled.Model.Map LoadWithDotTiledFromInMemoryTmjString()
|
||||||
{
|
{
|
||||||
using var mapReader = new DotTiled.TmjMapReader(_tmjContents, _ => throw new Exception(), _ => throw new Exception(), []);
|
using var mapReader = new DotTiled.Serialization.Tmj.TmjMapReader(_tmjContents, _ => throw new Exception(), _ => throw new Exception(), []);
|
||||||
return mapReader.ReadMap();
|
return mapReader.ReadMap();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
using DotTiled.Model.Layers;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
||||||
public static partial class DotTiledAssert
|
public static partial class DotTiledAssert
|
|
@ -1,3 +1,5 @@
|
||||||
|
using DotTiled.Model.Tilesets;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
||||||
public static partial class DotTiledAssert
|
public static partial class DotTiledAssert
|
|
@ -1,3 +1,5 @@
|
||||||
|
using DotTiled.Model.Layers;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
||||||
public static partial class DotTiledAssert
|
public static partial class DotTiledAssert
|
|
@ -1,5 +1,6 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
using DotTiled.Model;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
|
@ -1,20 +1,22 @@
|
||||||
|
using DotTiled.Model.Layers.Objects;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
||||||
public static partial class DotTiledAssert
|
public static partial class DotTiledAssert
|
||||||
{
|
{
|
||||||
internal static void AssertObject(Object expected, Object actual)
|
internal static void AssertObject(Model.Layers.Objects.Object expected, Model.Layers.Objects.Object actual)
|
||||||
{
|
{
|
||||||
// Attributes
|
// Attributes
|
||||||
AssertEqual(expected.ID, actual.ID, nameof(Object.ID));
|
AssertEqual(expected.ID, actual.ID, nameof(Model.Layers.Objects.Object.ID));
|
||||||
AssertEqual(expected.Name, actual.Name, nameof(Object.Name));
|
AssertEqual(expected.Name, actual.Name, nameof(Model.Layers.Objects.Object.Name));
|
||||||
AssertEqual(expected.Type, actual.Type, nameof(Object.Type));
|
AssertEqual(expected.Type, actual.Type, nameof(Model.Layers.Objects.Object.Type));
|
||||||
AssertEqual(expected.X, actual.X, nameof(Object.X));
|
AssertEqual(expected.X, actual.X, nameof(Model.Layers.Objects.Object.X));
|
||||||
AssertEqual(expected.Y, actual.Y, nameof(Object.Y));
|
AssertEqual(expected.Y, actual.Y, nameof(Model.Layers.Objects.Object.Y));
|
||||||
AssertEqual(expected.Width, actual.Width, nameof(Object.Width));
|
AssertEqual(expected.Width, actual.Width, nameof(Model.Layers.Objects.Object.Width));
|
||||||
AssertEqual(expected.Height, actual.Height, nameof(Object.Height));
|
AssertEqual(expected.Height, actual.Height, nameof(Model.Layers.Objects.Object.Height));
|
||||||
AssertEqual(expected.Rotation, actual.Rotation, nameof(Object.Rotation));
|
AssertEqual(expected.Rotation, actual.Rotation, nameof(Model.Layers.Objects.Object.Rotation));
|
||||||
AssertEqual(expected.Visible, actual.Visible, nameof(Object.Visible));
|
AssertEqual(expected.Visible, actual.Visible, nameof(Model.Layers.Objects.Object.Visible));
|
||||||
AssertEqual(expected.Template, actual.Template, nameof(Object.Template));
|
AssertEqual(expected.Template, actual.Template, nameof(Model.Layers.Objects.Object.Template));
|
||||||
|
|
||||||
AssertProperties(expected.Properties, actual.Properties);
|
AssertProperties(expected.Properties, actual.Properties);
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
using DotTiled.Model.Properties;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
||||||
public static partial class DotTiledAssert
|
public static partial class DotTiledAssert
|
|
@ -1,3 +1,6 @@
|
||||||
|
using DotTiled.Model.Layers;
|
||||||
|
using DotTiled.Model.Tilesets;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
||||||
public static partial class DotTiledAssert
|
public static partial class DotTiledAssert
|
|
@ -1,4 +1,6 @@
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using DotTiled.Model.Properties;
|
||||||
|
using DotTiled.Model.Properties.CustomTypes;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
using DotTiled.Model;
|
||||||
|
using DotTiled.Model.Layers;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
||||||
public partial class TestData
|
public partial class TestData
|
|
@ -1,4 +1,8 @@
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using DotTiled.Model;
|
||||||
|
using DotTiled.Model.Layers;
|
||||||
|
using DotTiled.Model.Properties;
|
||||||
|
using DotTiled.Model.Tilesets;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
@ -1,4 +1,7 @@
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using DotTiled.Model;
|
||||||
|
using DotTiled.Model.Layers;
|
||||||
|
using DotTiled.Model.Tilesets;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
@ -1,4 +1,7 @@
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using DotTiled.Model;
|
||||||
|
using DotTiled.Model.Layers;
|
||||||
|
using DotTiled.Model.Properties;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using DotTiled.Model;
|
||||||
|
using DotTiled.Model.Layers;
|
||||||
|
using DotTiled.Model.Properties;
|
||||||
|
using DotTiled.Model.Properties.CustomTypes;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using DotTiled.Model;
|
||||||
|
using DotTiled.Model.Layers;
|
||||||
|
using DotTiled.Model.Tilesets;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
@ -1,4 +1,7 @@
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using DotTiled.Model;
|
||||||
|
using DotTiled.Model.Layers;
|
||||||
|
using DotTiled.Model.Tilesets;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
@ -1,4 +1,7 @@
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using DotTiled.Model;
|
||||||
|
using DotTiled.Model.Layers;
|
||||||
|
using DotTiled.Model.Tilesets;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
@ -1,4 +1,9 @@
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
using DotTiled.Model;
|
||||||
|
using DotTiled.Model.Layers;
|
||||||
|
using DotTiled.Model.Layers.Objects;
|
||||||
|
using DotTiled.Model.Properties;
|
||||||
|
using DotTiled.Model.Tilesets;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
@ -1,3 +1,8 @@
|
||||||
|
using DotTiled.Model;
|
||||||
|
using DotTiled.Model.Properties.CustomTypes;
|
||||||
|
using DotTiled.Model.Tilesets;
|
||||||
|
using DotTiled.Serialization.Tmj;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
||||||
public partial class TmjMapReaderTests
|
public partial class TmjMapReaderTests
|
|
@ -1,4 +1,8 @@
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using DotTiled.Model;
|
||||||
|
using DotTiled.Model.Properties.CustomTypes;
|
||||||
|
using DotTiled.Model.Tilesets;
|
||||||
|
using DotTiled.Serialization.Tmx;
|
||||||
|
|
||||||
namespace DotTiled.Tests;
|
namespace DotTiled.Tests;
|
||||||
|
|
|
@ -2,7 +2,7 @@ using System;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model;
|
||||||
|
|
||||||
public class Color : IParsable<Color>, IEquatable<Color>
|
public class Color : IParsable<Color>, IEquatable<Color>
|
||||||
{
|
{
|
|
@ -1,6 +1,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using DotTiled.Model.Properties;
|
||||||
|
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Layers;
|
||||||
|
|
||||||
public abstract class BaseLayer
|
public abstract class BaseLayer
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Layers;
|
||||||
|
|
||||||
public enum DataEncoding
|
public enum DataEncoding
|
||||||
{
|
{
|
|
@ -1,6 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Layers;
|
||||||
|
|
||||||
public class Group : BaseLayer
|
public class Group : BaseLayer
|
||||||
{
|
{
|
|
@ -1,4 +1,6 @@
|
||||||
namespace DotTiled;
|
using DotTiled.Model.Tilesets;
|
||||||
|
|
||||||
|
namespace DotTiled.Model.Layers;
|
||||||
|
|
||||||
public class ImageLayer : BaseLayer
|
public class ImageLayer : BaseLayer
|
||||||
{
|
{
|
|
@ -1,6 +1,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using DotTiled.Model.Layers.Objects;
|
||||||
|
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Layers;
|
||||||
|
|
||||||
public enum DrawOrder
|
public enum DrawOrder
|
||||||
{
|
{
|
|
@ -1,3 +1,3 @@
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Layers.Objects;
|
||||||
|
|
||||||
public class EllipseObject : Object { }
|
public class EllipseObject : Object { }
|
|
@ -1,6 +1,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using DotTiled.Model.Properties;
|
||||||
|
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Layers.Objects;
|
||||||
|
|
||||||
public abstract class Object
|
public abstract class Object
|
||||||
{
|
{
|
3
src/DotTiled/Model/Layers/Objects/PointObject.cs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
namespace DotTiled.Model.Layers.Objects;
|
||||||
|
|
||||||
|
public class PointObject : Object { }
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Layers.Objects;
|
||||||
|
|
||||||
public class PolygonObject : Object
|
public class PolygonObject : Object
|
||||||
{
|
{
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Layers.Objects;
|
||||||
|
|
||||||
public class PolylineObject : Object
|
public class PolylineObject : Object
|
||||||
{
|
{
|
|
@ -1,3 +1,3 @@
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Layers.Objects;
|
||||||
|
|
||||||
public class RectangleObject : Object { }
|
public class RectangleObject : Object { }
|
|
@ -1,6 +1,6 @@
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Layers.Objects;
|
||||||
|
|
||||||
|
|
||||||
public enum TextHorizontalAlignment
|
public enum TextHorizontalAlignment
|
|
@ -1,4 +1,4 @@
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Layers.Objects;
|
||||||
|
|
||||||
public class TileObject : Object
|
public class TileObject : Object
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Layers;
|
||||||
|
|
||||||
public class TileLayer : BaseLayer
|
public class TileLayer : BaseLayer
|
||||||
{
|
{
|
|
@ -1,7 +1,10 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using DotTiled.Model.Layers;
|
||||||
|
using DotTiled.Model.Properties;
|
||||||
|
using DotTiled.Model.Tilesets;
|
||||||
|
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model;
|
||||||
|
|
||||||
public enum MapOrientation
|
public enum MapOrientation
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Properties;
|
||||||
|
|
||||||
public class BoolProperty : IProperty
|
public class BoolProperty : IProperty
|
||||||
{
|
{
|
|
@ -1,12 +1,12 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Properties;
|
||||||
|
|
||||||
public class ClassProperty : IProperty
|
public class ClassProperty : IProperty
|
||||||
{
|
{
|
||||||
public required string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
public PropertyType Type => DotTiled.PropertyType.Class;
|
public PropertyType Type => Model.Properties.PropertyType.Class;
|
||||||
public required string PropertyType { get; set; }
|
public required string PropertyType { get; set; }
|
||||||
public required Dictionary<string, IProperty> Properties { get; set; }
|
public required Dictionary<string, IProperty> Properties { get; set; }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Properties;
|
||||||
|
|
||||||
public class ColorProperty : IProperty
|
public class ColorProperty : IProperty
|
||||||
{
|
{
|
|
@ -1,7 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Properties.CustomTypes;
|
||||||
|
|
||||||
[Flags]
|
[Flags]
|
||||||
public enum CustomClassUseAs
|
public enum CustomClassUseAs
|
|
@ -1,6 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Properties.CustomTypes;
|
||||||
|
|
||||||
public enum CustomEnumStorageType
|
public enum CustomEnumStorageType
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Properties.CustomTypes;
|
||||||
|
|
||||||
public abstract class CustomTypeDefinition
|
public abstract class CustomTypeDefinition
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Properties;
|
||||||
|
|
||||||
public class FileProperty : IProperty
|
public class FileProperty : IProperty
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
namespace DotTiled;
|
namespace DotTiled.Model.Properties;
|
||||||
|
|
||||||
public class FloatProperty : IProperty
|
public class FloatProperty : IProperty
|
||||||
{
|
{
|