Exemplo n.º 1
0
 public void AddAnimation(string name, int row, int frames, AnimationClass animation)
 {
     Rectangle[] recs = new Rectangle[frames];
     for (int i = 0; i < frames; i++)
     {
         recs[i] = new Rectangle(i * width, (row - 1) * height, width, height);
     }
     animation.Frames     = frames;
     animation.Rectangles = recs;
     Animations.Add(name, animation);
 }
Exemplo n.º 2
0
        public AnimationClass Copy()
        {
            AnimationClass ac = new AnimationClass();

            ac.Rectangles   = Rectangles;
            ac.Colour       = Colour;
            ac.Origin       = Origin;
            ac.Rotation     = Rotation;
            ac.Scale        = Scale;
            ac.SpriteEffect = SpriteEffect;
            ac.IsLooping    = IsLooping;
            ac.Frames       = Frames;
            return(ac);
        }