From 34ef18f682ca5358e2f1e5253d34ce31c04bd89b Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Sat, 8 Dec 2018 17:04:33 -0600 Subject: [PATCH] added convenience constructor for texture atlas data, as well as changed standard extension for texture atlas to ".tatlas". --- .../TextureAtlas/TextureAtlasData.cs | 6 ++++++ .../TextureAtlas/TextureAtlasImporter.cs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasData.cs b/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasData.cs index 460b733..4ed3c9b 100644 --- a/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasData.cs +++ b/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasData.cs @@ -15,6 +15,12 @@ namespace RecrownedAthenaeum.Pipeline.TextureAtlas public TextureAtlasRegion[] regions; public string textureName; + public TextureAtlasData(string textureName, TextureAtlasRegion[] regions) + { + this.regions = regions; + this.textureName = textureName; + } + public class TextureAtlasRegion { public string name; diff --git a/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasImporter.cs b/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasImporter.cs index 5c68361..05f1577 100644 --- a/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasImporter.cs +++ b/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasImporter.cs @@ -11,7 +11,7 @@ using System.Xml.Serialization; namespace RecrownedAthenaeum.Pipeline.TextureAtlas { - [ContentImporter(".atlas", DisplayName = "Texture Atlas Importer")] + [ContentImporter(".tatlas", DisplayName = "Texture Atlas Importer")] internal class TextureAtlasImporter : ContentImporter { public override TextureAtlasData Import(string filename, ContentImporterContext context)