Exemple #1
0
 /// <summary>
 /// Play the animations in a slide.
 /// </summary>
 /// <param name="slideKey">Key for the slide in collection.</param>
 public void PlaySlide(string slideKey)
 {
     CurrentSlide = Slides[slideKey];
     if (CurrentSlide != null)
     {
         CurrentSlide.PlayFrame();
     }
 }
        /// <summary>
        /// Add a new slide to this animated objects atlas.
        /// </summary>
        /// <param name="slideKey">Indentifying key for this animation slide.</param>
        /// <param name="slide">Slide to add to this animated objects atlas.</param>
        protected void AddAnimationSlide(string slideKey, AnimationSlide slide)
        {
            if (_atlas.CurrentSlide == null)
            {
                _atlas.CurrentSlide = slide;
                var t = _atlas.CurrentSlide.CurrentTexture;
                DrawRectangle = DrawRectangle = new Rectangle(t.X, t.Y, t.Width, t.Height);
            }

            _atlas.AddSlide(slideKey, slide);
        }
Exemple #3
0
 /// <summary>
 /// Add a new slide to the atlas' collection.
 /// </summary>
 /// <param name="slideKey">Indentifying key for this slide.</param>
 /// <param name="slide">Slide to add to atlas' collection.</param>
 public void AddSlide(string slideKey, AnimationSlide slide)
 {
     Slides.Add(slideKey, slide);
 }