Made AnimationEditor compatible with Dictionary SpriteMaps

Added MonoGame Pipeline's IntermediateSerializer and needed classes from the pipeline and  MonoGame.Framework.Utilities to make AnimationEditor capable of reading Dictionaries
This commit is contained in:
quinnvoker
2018-11-24 16:43:44 -08:00
parent 82ad36e485
commit c585f312a5
52 changed files with 3576 additions and 64 deletions
@@ -0,0 +1,34 @@
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
using System.Collections.Generic;
using System.Xml;
namespace Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate
{
[ContentTypeSerializer]
class Vector4Serializer : ElementSerializer<Vector4>
{
public Vector4Serializer() :
base("Vector4", 4)
{
}
protected internal override Vector4 Deserialize(string[] inputs, ref int index)
{
return new Vector4( XmlConvert.ToSingle(inputs[index++]),
XmlConvert.ToSingle(inputs[index++]),
XmlConvert.ToSingle(inputs[index++]),
XmlConvert.ToSingle(inputs[index++]));
}
protected internal override void Serialize(Vector4 value, List<string> results)
{
results.Add(XmlConvert.ToString(value.X));
results.Add(XmlConvert.ToString(value.Y));
results.Add(XmlConvert.ToString(value.Z));
results.Add(XmlConvert.ToString(value.W));
}
}
}