void CorrectWeaponStateAnimation() { //Play the current animation associated with this state //BUT, we want to make sure we play from the frame of the animation // we were just on, to preserve state (for example, if you pull out a //blaster while running, we don't want the run animation to suddenly restart) if (m_Animator2D && !string.IsNullOrEmpty(m_CharacterState.AnimationName)) { m_Animator2D.PlayFromCurrentFrame(m_CharacterState.AnimationName); } }