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; } }
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; } }