public void OnDrag(PointerEventData data)
    {
        Vector3 newPos = Vector3.zero;

        if (m_UseX)
        {
            int delta = (int)(data.position.x - startDownPos.x);
            newPos.x = delta;
        }

        if (m_UseY)
        {
            int delta = (int)(data.position.y - startDownPos.y);
            newPos.y = delta;
        }
      

        newPos = Vector3.ClampMagnitude(newPos, MovementRange);

        InputUI inputUI = GameObject.FindGameObjectWithTag("InputUI").GetComponent<InputUI>();

        inputUI.AcceptThrowDelta(newPos);

        pointerPoint.transform.position = newPos + startDownPos;

        UpdateVirtualAxes(pointerPoint.transform.position);
    }
    public void OnPointerUp(PointerEventData data)
    {
        //print("OnPointerUp()");
        Vector3 delta = Vector3.zero;
        if (m_UseX)
        {
            int x = (int)(data.position.x - startDownPos.x);
            delta.x = x;
        }

        if (m_UseY)
        {
            int y = (int)(data.position.y - startDownPos.y);
            delta.y = y;
        }

        delta = Vector3.ClampMagnitude(delta, MovementRange);

        InputUI inputUI = GameObject.FindGameObjectWithTag("InputUI").GetComponent<InputUI>();
        inputUI.AcceptThrowDelta(delta);
        inputUI.ReleaseThrow();

        pointerPoint.transform.position = startDownPos;
        UpdateVirtualAxes(startDownPos);

        pointerBase.GetComponent<Image>().color = passiveColor;
        pointerPoint.GetComponent<Image>().color = passiveColor;
    }