- XnaAnimatedSprite_source.zip
- AnimatedSpriteExample
- AnimatedSpriteExample
- AnimatedSpriteExampleContent
- allies.jpg
- AnimatedSpriteExampleContent.contentproj
- BigPlanes.png
- bin
- Windows Phone
- Debug
- x86
- Debug
- Release
- Xbox 360
- Debug
- DebugFont.spritefont
- MarioMap.animatedSprite
- MarioRunning.png
- MyAnimatedSprite.animatedSprite
- obj
- Windows Phone
- Debug
- x86
- Debug
- TempPE
- Xbox 360
- Debug
- PlaneMap.animatedSprite
- J2i.Net.AnimatedSpriteLibrary.Extension
- J2i.Net.AnimatedSpriteLibrary
- J2i.Net.SpriteSheets.sln
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
namespace J2i.Net.AnimatedSpriteLibrary.Extension
{
class AnimatedSpriteWriter: ContentTypeWriter<AnimatedSprite>
{
protected override void Write(ContentWriter output, AnimatedSprite value)
{
XmlSerializer xs = new XmlSerializer(typeof(AnimatedSprite));
System.IO.StringWriter sw = new StringWriter();
xs.Serialize(sw, value);
output.Write(value.Name);
output.Write(sw.ToString());
}
public override string GetRuntimeType(Microsoft.Xna.Framework.Content.Pipeline.TargetPlatform targetPlatform)
{
return "J2i.Net.AnimatedSriteLibrary, AnimatedSprite, Version=1.0.0.0, Culture=neutral";
}
public override string GetRuntimeReader(Microsoft.Xna.Framework.Content.Pipeline.TargetPlatform targetPlatform)
{
return "J2i.Net.AnimatedSriteLibrary, AnimatedSpriteReader, Version=1.0.0.0, Culture=neutral";
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.