void OnMouseDown() { communications = comPort.GetComponent<UnitySerialPort>() as UnitySerialPort; Debug.Log("Mouse Down"); if (!Occupied) { Occupied = !Occupied; arrow.SetActive(true); xSign.SetActive(false); if (communications.isActiveAndEnabled) { communications.setState(0x01, 0x23, Occupied); } } else { Occupied = !Occupied; arrow.SetActive(false); xSign.SetActive(true); if (communications.isActiveAndEnabled) { communications.setState(0x1, 0x23, Occupied); } } }
void setRed() { communications = comPort.GetComponent<UnitySerialPort>() as UnitySerialPort; if (communications.isActiveAndEnabled) { communications.setState((byte)(m_Grana + 1), (byte)(m_Adresa + 1), true); } }
void setAuto() { isManualyRed = !isManualyRed; communications = comPort.GetComponent<UnitySerialPort>() as UnitySerialPort; if (communications.isActiveAndEnabled) { communications.setState((byte)(m_Grana + 1), (byte)(m_Adresa + 1), false); } }