Exemplo n.º 1
0
    private void CancelConnection()
    {
        RectTransform transform = this.GetComponent <RectTransform> ();

        Debug.Log(transform == null);
        GameObject gObj = ConnectionManager.GetOtherSide(transform, ConnectionPoint.ConnectionDirection.West);

        if (gObj != null)
        {
            TerminalBlockConnection nc = gObj.GetComponent <TerminalBlockConnection> ();
            if (nc != null)
            {
                if (ConnectionManager.DeleteThisConnection(this.GetComponent <RectTransform> (), ConnectionPoint.ConnectionDirection.West))
                {
                    nc.isEmpty = true;
                    nc.changed = true;
                    //Debug.Log("sucesso");F
                }
                else
                {
                    //Debug.Log("sem sucesso");
                }
            }
        }
    }
Exemplo n.º 2
0
    private void CancelConnection()
    {
        GameObject gObj = ConnectionManager.GetOtherSide(this.transform.parent.GetComponent <RectTransform> (), connectionDir);

        if (gObj != null)
        {
            TerminalBlockConnection nc = gObj.GetComponent <TerminalBlockConnection> ();
            if (nc != null)
            {
                if (ConnectionManager.DeleteThisConnection(this.transform.parent.GetComponent <RectTransform> (), connectionDir))
                {
                    isEmpty    = true;
                    changed    = true;
                    nc.isEmpty = true;
                    nc.changed = true;
                }
            }
        }
    }