using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class DragCheck : MonoBehaviour { public List ItemList = new List(); public bool isMainAear = false; private void Start() { if (isMainAear) { this.GetComponent().color = Color.green; this.transform.GetChild(0).GetComponent().color = Color.green; } else { this.GetComponent().color = Color.white; this.transform.GetChild(0).GetComponent().color = Color.white; } } public void ShowItem() { //显示探测器设备模型 for (int i = 0; i < ItemList.Count; i++) { ItemList[i].SetActive(true); this.gameObject.SetActive(false); if (GameManagerForZhuanWan.Instance != null) { GameManagerForZhuanWan.Instance.RegisetItem(this.gameObject.name, this); } } } }