接入基本设备

This commit is contained in:
suntao committed 2021-06-04 13:22:59 +08:00
1 parent 2f84f70a5f
commit 7729332f41
62 files changed
+2880 -86

No files matched your search

@@ -10,6 +10,7 @@ public class DeviceItem : Selectable, IEventSystemHandler, IPointerClickHandler
{
private bool isOn;
private Text mText;
private Text mType;
public AbstractDevice DeviceInfo
{
get;set;
@@ -18,6 +19,7 @@ public class DeviceItem : Selectable, IEventSystemHandler, IPointerClickHandler
protected override void Awake()
{
mText = this.transform.Find("Name").GetComponent<Text>();
mType = this.transform.Find("Type").GetComponent<Text>();
}
// Start is called before the first frame update
@@ -25,11 +27,17 @@ public class DeviceItem : Selectable, IEventSystemHandler, IPointerClickHandler
{
//this.currentSelectionState = SelectionState.Selected
mText.text = DeviceInfo.Name + "-" + DeviceInfo.DeviceNumber;
mText.text = DeviceInfo.Name;// + "-" + DeviceInfo.DeviceNumber;
if(DeviceInfo.Network == NetworkType.ANT)
{
mText.text += "-" + DeviceInfo.DeviceNumber;
}
//if(DeviceInfo.State == DeviceState.Connected)
{
// this.SetSelectedStyle();
}
mType.text = DeviceInfo.Network.ToString();
}