Engines/FlatRedBallXNA/FlatRedBall.Content/ModelAnimation/AnimationWriter.cs
/// <summary>
/// Writes a ModelInfo object into XNB data
/// </summary>
/// <param name="output">The stream that contains the written data</param>
/// <param name="value">The instance to be serialized</param>
Writes a ModelInfo object into XNB data
Writes a ModelInfo object into XNB data
protected override void Write(ContentWriter output, AnimationContentDictionary value)
        {
            AnimationContentDictionary animations = value;
            output.Write(animations.Count);
            foreach (KeyValuePair<string, AnimationContent> k in animations)
            {
                output.Write(k.Key);
                output.Write(k.Value.Channels.Count);
                foreach (KeyValuePair<string, AnimationChannel> chan in k.Value.Channels)
                {
                    output.Write(chan.Key);
                    output.Write(chan.Value.Count);
                    foreach (AnimationKeyframe keyframe in chan.Value)
                    {
                        output.Write(keyframe.Transform);
                        output.Write(keyframe.Time.Ticks);
                    }
                }
            }
        }
protected override void Write ( ContentWriter output , AnimationContentDictionary value ) { AnimationContentDictionary animations = value ; output . Write ( animations . Count ) ; foreach ( KeyValuePair < string , AnimationContent > k in animations ) { output . Write ( k . Key ) ; output . Write ( k . Value . Channels . Count ) ; foreach ( KeyValuePair < string , AnimationChannel > chan in k . Value . Channels ) { output . Write ( chan . Key ) ; output . Write ( chan . Value . Count ) ; foreach ( AnimationKeyframe keyframe in chan . Value ) { output . Write ( keyframe . Transform ) ; output . Write ( keyframe . Time . Ticks ) ; } } } }
Writes a ModelInfo object into XNB data
Writes a ModelInfo object into XNB data
output
ContentWriter
The stream that contains the written data
The stream that contains the written data
value
AnimationContentDictionary
The instance to be serialized
The instance to be serialized