using System.Collections; using System.Collections.Generic; using UnityEngine; public class DYKGSensor : Sensor { /// /// µçÔ´ÊÇ·ñ¿ªÆô /// [HideInInspector] public bool isOpen; public override void ReceiveData(string datas) { base.ReceiveData(datas); //if (!datas.Split(',')[0].Split(':')[1].Equals(" XWJ")) return; this.Log(datas); if (datas.Contains("CONNECTED 1") || !string.IsNullOrEmpty(datas)) { isOpen = true; } if (datas.Contains("DISCONNECTED")) { isOpen = false; } //isOpen = (!string.IsNullOrEmpty(datas)); } public override void Display(string datas) { //pressText.text = press; } }