preferences now use object as type for serialization and no longer uses marker interface.

This commit is contained in:
2018-12-05 00:03:00 -06:00
parent 151480eaee
commit 87823b26d6
9 changed files with 28 additions and 35 deletions

View File

@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace RecrownedAthenaeum.Pipeline.NinePatch
{
class NinePatchTemplate
class NinePatchFile
{
public string name;
public string bounds;

View File

@@ -11,13 +11,13 @@ using System.Xml.Serialization;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
internal class TextureAtlasImporter : ContentImporter<TextureAtlasTemplate>
internal class TextureAtlasImporter : ContentImporter<TextureAtlasFile>
{
public override TextureAtlasTemplate Import(string filename, ContentImporterContext context)
public override TextureAtlasFile Import(string filename, ContentImporterContext context)
{
StreamReader stream = new StreamReader(filename);
XmlSerializer serializer = new XmlSerializer(typeof(TextureAtlasTemplate));
TextureAtlasTemplate atlas = (TextureAtlasTemplate)serializer.Deserialize(stream);
XmlSerializer serializer = new XmlSerializer(typeof(TextureAtlasFile));
TextureAtlasFile atlas = (TextureAtlasFile)serializer.Deserialize(stream);
context.AddDependency(atlas.textureName);
stream.Dispose();
return atlas;

View File

@@ -10,10 +10,10 @@ using System.Threading.Tasks;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
class TextureAtlasProcessor : ContentProcessor<TextureAtlasTemplate, TextureAtlasTemplate>
class TextureAtlasProcessor : ContentProcessor<TextureAtlasFile, TextureAtlasFile>
{
public override TextureAtlasTemplate Process(TextureAtlasTemplate input, ContentProcessorContext context)
public override TextureAtlasFile Process(TextureAtlasFile input, ContentProcessorContext context)
{
return input;
}

View File

@@ -8,7 +8,7 @@ using System.Xml.Serialization;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
public class TextureAtlasTemplate
public class TextureAtlasFile
{
public string textureName;
public TextureAtlasRegion[] regions;

View File

@@ -8,14 +8,14 @@ using System.Threading.Tasks;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
class TextureAtlasWriter : ContentTypeWriter<TextureAtlasTemplate>
class TextureAtlasWriter : ContentTypeWriter<TextureAtlasFile>
{
public override string GetRuntimeReader(TargetPlatform targetPlatform)
{
throw new NotImplementedException();
}
protected override void Write(ContentWriter output, TextureAtlasTemplate value)
protected override void Write(ContentWriter output, TextureAtlasFile value)
{
throw new NotImplementedException();
}