コード例 #1
0
        //load the avatar animation...
        public void LoadContent(ContentRegister content, DrawState state, ContentManager manager)
        {
            //load the model data into the model instance

            /********************************************************************************************/
            /********************************************************************************************/
            avatar.AddNamedAnimation(manager.Load <AvatarAnimationData>(@"AvatarAnimations\walk"), "Walk");
            /********************************************************************************************/
            /********************************************************************************************/
            /*																							*/
            /*	Getting an exeption here? Here is how to fix it:										*/
            /*																							*/
            /********************************************************************************************/
            /********************************************************************************************/

            /*/
             *
             * This sample demonstrates two forms of avatar animation, 'preset' animations that are
             * standard animations available to all XNA applications, and custom animations imported
             * from an FBX file.
             *
             * The fbx used in this tutorial is walk.fbx, from the XNA custom avatar animation sample.
             * This sample is for premium members only (so can't be redistributed) and is also a quite
             * large download. (Walk.fbx is 10MB!)
             *
             * The sample can be downloaded here:
             * http://creators.xna.com/en-US/sample/customavataranimation
             * http://creators.xna.com/downloads/?id=387
             *
             * Once downloaded and extracted, add Walk.fbx in the 'AvatarAnimations' directory in
             * the Content project.
             * Once added, set the content processor to 'Avatar Animation - Xen'.
             *
             * Note:
             *
             * The XNA sample assumes there is a single animation per FBX file.
             * Use the 'AddNamedAnimation' method to load these types of animation files. For FBX
             * files with multiple animations (that are already named) use the 'AddAnimationSource'
             * method.
             *
             * /*/
        }