Engines/FlatRedBallXNA/FlatRedBall.Content/ModelAnimation/AnimatedModelProcessor.cs
/// <summary>
/// Searches through the NodeContent tree for all animations and puts them in
/// one AnimationContentDictionary
/// </summary>
/// <param name="node">The root of the tree</param>
Searches through the NodeContent tree for all animations and puts them in
one AnimationContentDictionary
Searches through the NodeContent tree for all animations and puts them in one AnimationContentDictionary
private void FindAnimations(NodeContent node)
        {
            foreach (KeyValuePair<string, AnimationContent> k in node.Animations)
            {
                if (animations.ContainsKey(k.Key))
                {
                    foreach (KeyValuePair<string, AnimationChannel> c in k.Value.Channels)
                    {
                        animations[k.Key].Channels.Add(c.Key, c.Value);
                    }
                }
                else
                {
                    animations.Add(k.Key, k.Value);
                }
            }
            foreach (NodeContent child in node.Children)
                FindAnimations(child);
        }
private void FindAnimations ( NodeContent node ) { foreach ( KeyValuePair < string , AnimationContent > k in node . Animations ) { if ( animations . ContainsKey ( k . Key ) ) { foreach ( KeyValuePair < string , AnimationChannel > c in k . Value . Channels ) { animations [ k . Key ] . Channels . Add ( c . Key , c . Value ) ; } } else { animations . Add ( k . Key , k . Value ) ; } } foreach ( NodeContent child in node . Children ) FindAnimations ( child ) ; }
Searches through the NodeContent tree for all animations and puts them in
one AnimationContentDictionary
Searches through the NodeContent tree for all animations and puts them in one AnimationContentDictionary
node
NodeContent
The root of the tree
The root of the tree