// Update is called once per frame


    public void activateThisAnimationStateState(TheAnimationState animationState)
    {
        updateCurrentState(animationState);
        var states = Enum.GetValues(typeof(TheAnimationState));

        foreach (int stateNumber in states)
        {
            if ((TheAnimationState)stateNumber == animationState)
            {
                animator.SetBool(animationState.ToString(), true);
                this.currentAnimationState = animationState;
            }
            else
            {
                animator.SetBool(((TheAnimationState)stateNumber).ToString(), false);
            }
        }
    }
 public void updateCurrentState(TheAnimationState newAnimationState)
 {
     this.currentAnimationState = newAnimationState;
 }
 // Start is called before the first frame update
 void Start()
 {
     currentAnimationState = TheAnimationState.Idle;
     animator = GetComponent <Animator>();
 }