// Update is called once per frame
    public void ProcessInput()
    {
        if (isMoving)
        {
            return;
        }
        CancelPressed = CancelPressed || Input.GetButtonDown("Cancel");
        if (CancelPressed && !isMoving)
        {
            SelectPressed = CancelPressed = false;
            ParentHolder.CloseMenuAndReOoenCaller();
            return;
        }
        SelectPressed = SelectPressed || Input.GetButtonDown("Submit");
        if (SelectPressed && !isMoving)
        {
            SelectPressed = CancelPressed = false;
            ActionData selectedAction = this.AvailableActions.List[SelectedIndex];
            if (!selectedAction.CanPerformAction(ActingUnit.Value))
            {
                return; // do no perform actions that cannot be done
            }
            if (selectedAction.TargetType != TargetType.Targetless)
            {
                ActivateTargettingSystem();
            }
            else
            {
                selectedAction.PerformAction(ActingUnit.Value, null);
                this.ParentHolder.CloseAllMenus();
            }
            return;
        }

        float verticalAxis = Input.GetAxis("Vertical");

        HandleVerticalInput(verticalAxis);
    }