if (Input.GetKeyDown(KeyCode.A)) { if (!anim.IsPlaying("walk")) { anim.Play("walk"); anim.AnimationCompleted = null; walking = true; } }