From f5cbd9dbab4332db37abe3163a406aef7c1608fd Mon Sep 17 00:00:00 2001 From: Harrison Deng Date: Mon, 14 Jan 2019 23:38:50 -0600 Subject: [PATCH] refactors --- .../TextureAtlas/TextureAtlasData.cs | 6 +++--- RecrownedAthenaeum.Tools/TextureAtlasTools/TexturePacker.cs | 4 ++-- RecrownedAthenaeum/Pipeline/TextureAtlasDataReader.cs | 2 +- RecrownedAthenaeum/RecrownedAthenaeum.csproj | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasData.cs b/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasData.cs index 1d520ad..482815a 100644 --- a/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasData.cs +++ b/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasData.cs @@ -5,16 +5,16 @@ namespace RecrownedAthenaeum.Pipeline.TextureAtlas { public class TextureAtlasData { - public TextureAtlasRegion[] regions; + public AtlasRegionData[] regions; public string textureName; - public TextureAtlasData(string textureName, TextureAtlasRegion[] regions) + public TextureAtlasData(string textureName, AtlasRegionData[] regions) { this.regions = regions; this.textureName = textureName; } - public class TextureAtlasRegion + public class AtlasRegionData { public string name; public Rectangle location; diff --git a/RecrownedAthenaeum.Tools/TextureAtlasTools/TexturePacker.cs b/RecrownedAthenaeum.Tools/TextureAtlasTools/TexturePacker.cs index f6b4874..77a406b 100644 --- a/RecrownedAthenaeum.Tools/TextureAtlasTools/TexturePacker.cs +++ b/RecrownedAthenaeum.Tools/TextureAtlasTools/TexturePacker.cs @@ -122,7 +122,7 @@ namespace RecrownedAthenaeum.Tools.TextureAtlas { GraphicsOptions gOptions = new GraphicsOptions(); - TextureAtlasData.TextureAtlasRegion[] regions = new TextureAtlasData.TextureAtlasRegion[imageHandlersDictionary.Count]; + TextureAtlasData.AtlasRegionData[] regions = new TextureAtlasData.AtlasRegionData[imageHandlersDictionary.Count]; using (Image atlasTexture = new Image(TextureLength, TextureLength)) { @@ -130,7 +130,7 @@ namespace RecrownedAthenaeum.Tools.TextureAtlas for (int i = 0; i < imageHandlers.Length; i++) { - regions[i] = new TextureAtlasData.TextureAtlasRegion(); + regions[i] = new TextureAtlasData.AtlasRegionData(); ImageHandler ih = imageHandlers[i]; regions[i].SetBounds(ih.x, ih.y, ih.Width, ih.Height); regions[i].ninePatchData = ih.ninePatchData; diff --git a/RecrownedAthenaeum/Pipeline/TextureAtlasDataReader.cs b/RecrownedAthenaeum/Pipeline/TextureAtlasDataReader.cs index db338ef..78ddde1 100644 --- a/RecrownedAthenaeum/Pipeline/TextureAtlasDataReader.cs +++ b/RecrownedAthenaeum/Pipeline/TextureAtlasDataReader.cs @@ -20,7 +20,7 @@ namespace RecrownedAthenaeum.Pipeline for (int regionID = 0; regionID < regions.Length; regionID++) { - TextureAtlasData.TextureAtlasRegion regionData = atlasData.regions[regionID]; + TextureAtlasData.AtlasRegionData regionData = atlasData.regions[regionID]; DataTypes.NinePatch nPatch = null; if (regionData.ninePatchData != null) { diff --git a/RecrownedAthenaeum/RecrownedAthenaeum.csproj b/RecrownedAthenaeum/RecrownedAthenaeum.csproj index c771a89..b02ee9e 100644 --- a/RecrownedAthenaeum/RecrownedAthenaeum.csproj +++ b/RecrownedAthenaeum/RecrownedAthenaeum.csproj @@ -88,6 +88,7 @@ +