コード例 #1
0
    public void OnDrag(BaseEventData data)
    {
        var pointerData = data as PointerEventData;

        NextState = pointerData.pointerCurrentRaycast.gameObject.GetComponent <EntryNode>()?.State;
        if (NextState?.GUID == State.GUID)
        {
            NextState = null;
        }
        if (NextState)
        {
            m_tempTransition.SetColor(UiReferenceTracker.LevelInstance.Skin.GoodColor);
        }
        else
        {
            m_tempTransition.SetColor(UiReferenceTracker.LevelInstance.Skin.BadColor);
        }
        m_isDragging = true;
        m_tempTransition.SetLine(pointerData.position);
    }