示例#1
0
 /// <summary>
 /// Get the animation with a specific key.
 /// </summary>
 /// <param name="a">The key to search with.</param>
 /// <returns>The animation found.</returns>
 public Anim Anim(TAnimType a)
 {
     if (!Anims.ContainsKey(a))
     {
         return(null);
     }
     return(Anims[a]);
 }
示例#2
0
        /// <summary>
        /// Updates the animation.  The sprite will not animate without this.
        /// </summary>
        public override void Update()
        {
            base.Update();

            if (!Active)
            {
                return;
            }

            if (!Anims.ContainsKey(CurrentAnim))
            {
                return;
            }

            if (Paused)
            {
                return;
            }

            Anims[CurrentAnim].Update(Speed);

            UpdateSprite();
        }