Loading the Animations

Although this model contains 21 animations, we will only be using some of them. The Animations property of a ModelAnimator object contains all the animations that can run for the specific model. The AnimationController object can take one of these animations and step through it.
    private AnimationController idle, run, walk, nod, crouch, stayCrouched;

    private void InitializeAnimations()
    {
       idle = new AnimationController(Game, animator.Animations["idle0"]);
       run = new AnimationController(Game, animator.Animations["run"]);
       walk = new AnimationController(Game, animator.Animations["walk"]);
       nod = new AnimationController(Game, animator.Animations["nodHead"]);
       crouch = new AnimationController(Game, animator.Animations["crouchDown"]);
       stayCrouched = new AnimationController(Game, animator.Animations["stayCrouched"]);

       foreach (BonePose p in bones)
           p.CurrentAnimation = idle;
    }

Rotations and Idle State

        KeyboardState keyState = Keyboard.GetState();
        if (keyState.IsKeyDown(Keys.D))
        {
            rotation *=
                Matrix.CreateFromAxisAngle(Vector3.Up, -MathHelper.Pi / 32.0f);

        }
        if (keyState.IsKeyDown(Keys.A))
        {
            rotation *=
                Matrix.CreateFromAxisAngle(Vector3.Up, MathHelper.Pi / 32.0f);
        }
        protected override void RunCurrentState(GameTime gameTime)
        {
            KeyboardState keyState = Keyboard.GetState();
            switch (CurrentState)
            {
                case "idle":
                    if (keyState.IsKeyDown(Keys.W))
                    {
                        foreach (BonePose p in bones)
                        {
                            p.CurrentBlendAnimation = walk;
                            p.BlendFactor = 0;
                        }
                        Transition("idleToWalk");
                    }
                    else
                    {
                        UpdateEffects();
                    }
                    break;
            }
        }