Пример #1
0
    void Outline(Outliner outliner)
    {
        var min   = m_PointerDownPosition;
        var max   = m_PointerDragEndPosition;
        var delta = max - min;

        if (delta.x < 0)
        {
            var temp = min.x;
            min.x = max.x;
            max.x = temp;
        }

        if (delta.y < 0)
        {
            var temp = min.y;
            min.y = max.y;
            max.y = temp;
        }

        var minBounds = new Vector3(min.x, min.y);
        var maxBounds = new Vector3(max.x, max.y);

        if (min == max)
        {
            outliner.OutlineSinglePosition(minBounds);
        }
        else
        {
            outliner.OutlineWithBounds(minBounds, maxBounds);
        }
    }
Пример #2
0
    void Outline()
    {
        var min   = m_StartIndex;
        var max   = m_EndIndex;
        var delta = max - min;

        if (delta.x < 0)
        {
            var temp = min.x;
            min.x = max.x;
            max.x = temp;
        }

        if (delta.y < 0)
        {
            var temp = min.y;
            min.y = max.y;
            max.y = temp;
        }

        var minBounds = new Vector3(min.x, min.y);
        var maxBounds = new Vector3(max.x, max.y);

        if (min == max)
        {
            m_Outliner.OutlineSinglePosition(minBounds);
        }
        else
        {
            m_Outliner.OutlineWithBounds(minBounds, maxBounds);
        }
    }