예제 #1
0
    public void AddConnectedDevice(AbstractDevice device)
    {
        bool reconnected = false;

        if (connectedDevicesByName.ContainsKey(device.GetDeviceName()))
        {
            connectedDevicesByName.Remove(device.GetDeviceName());
            reconnected = true;
        }

        connectedDevicesByName.Add(device.GetDeviceName(), device);
        Debug.Log("Device " + device.GetDeviceName() + ((reconnected) ? " re" : " ") + "connected");
    }
예제 #2
0
 public void RemoveDevice(AbstractDevice device)
 {
     connectedDevicesByName.Remove(device.GetDeviceName());
 }