コード例 #1
0
 private void InsertInto(Socket socket)
 {
     GameObject.DestroyImmediate(mousePlugInstance);
     cursor.GetComponent <Image> ().enabled = true;
     connections.Add(new Tuple <Socket, Socket>(from, socket));
     socket.AddPlug();
     from = null;
     Debug.Log("Inserted");
 }
コード例 #2
0
    // -- Private methods --


    private void PickUp(Socket socket)
    {
        cursor.GetComponent <Image> ().enabled = false;
        mousePlugInstance = (GameObject)Instantiate(mousePlug, transform.position, Quaternion.identity);
        mousePlugInstance.transform.SetParent(transform);
        from = socket;
        from.AddPlug();
        //Debug.Log("Picked Up");
    }