public void UnlinkDevice() { if (this.IsLinked) { this.DisposeDevice(); //if (this.linkedDevice != null) // Debug.Log("Unlinked " + this.name + " from I\\O Device " + this.linkedDevice.DeviceID()); this.linkedDevice = null; this.DeviceIndex = -1; } }
public bool LinkDevice(SenseGloveCs.IODevice device, int index) { if (!this.IsLinked && this.CanLinkTo(device)) { this.linkedDevice = device; this.DeviceIndex = index; this.SetupDevice(); //Debug.Log("Linked " + this.name + " to I\\O Device " + device.DeviceID()); return(true); } return(false); }
protected virtual bool CanLinkTo(SenseGloveCs.IODevice device) { return(device != null); }