using UnityEngine; using UnityEngine.UI; using TMPro; namespace GHZLangChao { /// /// ShowDaoHang 面板 -- 搜索面板 ---子物体 /// public class SearchPanel_Item : MonoBehaviour { public TextMeshProUGUI Name; // 设备名称 public TextMeshProUGUI System; // 承载系统 public TextMeshProUGUI Pos; // 设备位置 public TextMeshProUGUI Type;// 设备类别 public TextMeshProUGUI Model;// 设备型号 public TextMeshProUGUI Factory;// 厂家 public TextMeshProUGUI Standards;// 规格 private MachineParameters MachineParameter; public void Init(MachineParameters MachineParameter) { this.MachineParameter = MachineParameter; Name.text = MachineParameter.deviceName; System.text = MachineParameter.carryingSystem; Pos.text = MachineParameter.deviceLocation; Type.text = MachineParameter.equipmentType; if(MachineParameter.equipmentModel!=null) Model.text = MachineParameter.equipmentModel; else Model.text = "--"; if(MachineParameter.factory!=null) Factory.text = MachineParameter.factory; else Factory.text = "--"; if(MachineParameter.specification!=null) Standards.text = MachineParameter.specification; else Standards.text = "--"; } private Color mButtonColor = new Color(102,178,255,128); public void ClickButton() { Debug.Log($"选择了{name}"); GetComponent().color = mButtonColor; XunJianManager.MachineParameters = MachineParameter; } } }