Esempio n. 1
0
    public void OnDrag(PointerEventData e)
    {
        if (!_dragging)
        {
            _direction = (Mathf.Abs(e.delta.x) >= Mathf.Abs(e.delta.y))? new Vector2(1, 0) : new Vector2(0, 1);
            _dragging  = true;
        }

        if (_direction.y == 1)
        {
            _controller.DragTier(e.delta * _direction);
        }
    }