Ejemplo n.º 1
0
    private void CalculateDragDelta()
    {
        InputDragDelta = Input.mousePosition - LastInputPosition;
        DeltaMagnitude = InputDragDelta.magnitude;

        if (InputDragDelta.magnitude > 0)
        {
            if (!_inputDrag)
            {
                ActiveInput.CreateDrag();
                _inputDrag = true;
            }

            CurrentState = InputState.Dragging;
        }
        else if (_inputDrag)
        {
            _inputDrag = false;
        }

        LastInputPosition = Input.mousePosition;
    }