Exemplo n.º 1
0
 public void AddAnimation(string name, Animation2 animation)
 {
     if (!Collection.ContainsKey(name))
     {
         Collection.Add(name, animation);
     }
 }
Exemplo n.º 2
0
        public void CreateRectangleAnimtaion(string name, int frameWidth, int frameHeight, int rowStart, int columnStart,
                                             int animationWidth, int animationHeight, double frameRate)
        {
            Animation2 animationNew = new Animation2();

            for (int row = rowStart; row < rowStart + animationHeight; row++)
            {
                for (int column = columnStart; column < columnStart + animationWidth; column++)
                {
                    animationNew.Slides.Add(new Rectangle(column * frameWidth, row * frameHeight,
                                                          frameWidth, frameHeight));
                }
            }

            animationNew.Framerate = frameRate;
            AddAnimation(name, animationNew);
        }