Пример #1
0
 public static void ApplyFramesAndFps(this tk2dSpriteAnimation animation, tk2dSpriteAnimation other, Dictionary <string, string> move, int definitionOffset)
 {
     foreach (KeyValuePair <string, string> pair in move)
     {
         tk2dSpriteAnimationClip sourceclip = animation.GetClipByName(pair.Key);
         tk2dSpriteAnimationClip newclip    = other.GetClipByName(pair.Value);
         sourceclip.frames = newclip.CloneFrames(definitionOffset).ToArray();
         sourceclip.fps    = newclip.fps;
     }
 }
Пример #2
0
        public static void ApplyFramesAndFps(this tk2dSpriteAnimation animation, tk2dSpriteAnimation other, Dictionary <string, string> move, bool clone)
        {
            if (!clone)
            {
                ApplyFramesAndFps(animation, other, move);
                return;
            }

            foreach (KeyValuePair <string, string> pair in move)
            {
                tk2dSpriteAnimationClip sourceclip = animation.GetClipByName(pair.Key);
                tk2dSpriteAnimationClip newclip    = other.GetClipByName(pair.Value);
                sourceclip.frames = newclip.CloneFrames().ToArray();
                sourceclip.fps    = newclip.fps;
            }
        }