Exemplo n.º 1
0
        internal void extractData(Sprite sprite)
        {
            sprite.Size = new Rectangle(Size.X, Size.Y, Size.Width, Size.Height);
            sprite.frames = new Frame[Frames.Length];
            Frames.CopyTo(sprite.frames, 0);
            sprite.animated = Animated;
            sprite.sheet = Sheet;
            sprite.Offset = Offset;

            foreach (KeyValuePair<string, Animation> pair in animations)
            {
                Animation copy = pair.Value.copy();
                sprite.addAnimation(copy);
            }
        }