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:
+28
@@ -0,0 +1,28 @@
|
||||
// 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 DoubleSerializer : ElementSerializer<double>
|
||||
{
|
||||
public DoubleSerializer() :
|
||||
base("double", 1)
|
||||
{
|
||||
}
|
||||
|
||||
protected internal override double Deserialize(string[] inputs, ref int index)
|
||||
{
|
||||
return XmlConvert.ToDouble(inputs[index++]);
|
||||
}
|
||||
|
||||
protected internal override void Serialize(double value, List<string> results)
|
||||
{
|
||||
results.Add(XmlConvert.ToString(value));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user