Exemple #1
0
        public string Save()
        {
            if (unitAnimList.IndexOf(this) == -1)
            {
                unitAnimList.Add(this);
            }
            List <V_Skeleton_Anim> animKeyframes = new List <V_Skeleton_Anim>();

            foreach (V_Skeleton_Anim anim in GetAnims())
            {
                V_Skeleton_Anim clonedKeyframes = anim.CloneOnlyKeyframes();
                animKeyframes.Add(clonedKeyframes);
            }

            // Reverse Animation Frame Multiplier
            foreach (V_Skeleton_Anim anim in animKeyframes)
            {
                foreach (V_Skeleton_Frame frame in anim.frames)
                {
                    frame.frameCount = frame.frameCount / ANIMATION_FRAME_MULTIPLIER; // Decrease frameCount
                }
                anim.SetFrameRateOriginal(anim.GetFrameRateOriginal() * ANIMATION_FRAME_MULTIPLIER);
            }



            string[] content = new string[] {
                "" + V_Animation.Save_List <V_Skeleton_Anim>(animKeyframes, V_Skeleton_Anim.Save_Static, "#SKELETONANIMLIST#"),
                "" + name,
            };
            return(string.Join("#ANIMATION#", content));
        }