예제 #1
0
    private void MouseOverNode(DNANode node)
    {
        if (editMode == EditMode.CreateDNA)
        {
            return;
        }

        if (!isClicking)
        {
            return;
        }

        if (firstConNode == null)
        {
            firstConNode = node;
            if (ConnectionLine == null)
            {
                ConnectionLine = Instantiate(ConnectionLinePrefub);
            }
            return;
        }

        if (secondConNode == null && firstConNode != node)
        {
            secondConNode = node;
        }
    }
예제 #2
0
    private void MouseExitNode(DNANode node)
    {
        if (editMode == EditMode.CreateDNA)
        {
            return;
        }

        if (secondConNode != null && node == secondConNode)
        {
            secondConNode = null;
        }
    }
예제 #3
0
    private void MouseButtonUp()
    {
        if (editMode == EditMode.CreateDNA)
        {
            return;
        }

        if (firstConNode != null && secondConNode != null)
        {
            ConnectionLine = null;
            connectionsCount++;
            updateVirusMetaInfo();
        }
        else
        {
            if (ConnectionLine != null)
            {
                Destroy(ConnectionLine.gameObject);
                ConnectionLine = null;
            }
        }
        firstConNode  = null;
        secondConNode = null;
    }