// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        UIDialogueManager d = FindObjectOfType <UIDialogueManager>();

        //Ensure d != null
        if (d == null)
        {
            Debug.Log("UIDialogueManager not found! Please make one.");
            return;
        }

        if (show)
        {
            d.Show();
        }
        else
        {
            d.Hide();
        }
    }