/// <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]); }
/// <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(); }