12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using UnityEngine;
- using UnityEngine.UI;
- using TMPro;
- namespace GHZLangChao
- {
- /// <summary>
- /// ShowDaoHang 面板 -- 搜索面板 ---子物体
- /// </summary>
- 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<RawImage>().color = mButtonColor;
- XunJianManager.MachineParameters = MachineParameter;
- }
- }
- }
|