Esempio n. 1
0
    public void AddConnection(TCPConnection connection)
    {
        DisplayedConnectionHandle handle = new DisplayedConnectionHandle();

        handle.connection = connection;
        handle.display    = Instantiate(connectionDisplayPrefab, transform).GetComponent <ConnectionDisplay>();
        handle.display.Init(connection);
        handles.Add(handle);
    }
Esempio n. 2
0
    public void RemoveConnection(TCPConnection connection)
    {
        DisplayedConnectionHandle handle = GetConnectionHandle(connection);

        if (handle != null)
        {
            Destroy(handle.display.gameObject);
            handles.Remove(handle);
        }
    }