Exemple #1
0
        /// <summary>
        /// Initializes the animation attribute.
        /// </summary>
        private void InitializeAnimation()
        {
            _animation = new Animation(TextureHolder.Textures["explosion"], 20, false);

            _animation.AddFrame(new Rectangle(25, 20, 150, 150));
            _animation.AddFrame(new Rectangle(217, 20, 150, 150));
            _animation.AddFrame(new Rectangle(417, 20, 150, 150));
            _animation.AddFrame(new Rectangle(614, 20, 150, 150));
            _animation.AddFrame(new Rectangle(808, 20, 150, 150));
            _animation.AddFrame(new Rectangle(1003, 20, 150, 150));
            _animation.AddFrame(new Rectangle(1205, 20, 150, 150));
            _animation.AddFrame(new Rectangle(1596, 20, 150, 150));
            _animation.AddFrame(new Rectangle(1789, 20, 150, 150));

            _animation.Start();
        }