예제 #1
0
    public void drawCable(CoreSocketCasing otherSocket)
    {
        if (connectedSocket != null)
        {
            connectedSocket.undrawCable();
        }
        if (otherSocket.connectedSocket != null)
        {
            otherSocket.undrawCable();
        }

        getCable();

        //Tell the sockets who they're now connected to
        connectedSocket = otherSocket;
        connectedSocket.connectedSocket = this;
        connectedSocket.cable           = cable;

        //Set the positions
        cable.SetPosition(0, this.transform.position);
        cable.SetPosition(1, otherSocket.transform.position);
    }
예제 #2
0
 public void destroyConnection(CoreSocketCasing socket)
 {
     socket.undrawCable();
     socket.GetComponentInParent <CoreCasing>().getComponent().io.disconnect(socket);
     print("Connection unmade");
 }