using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class LineLenghtPanel : ResourceLoadPanel { /// /// 显示管线米数方法 /// public void CheckIsLine() { gameObject.SetActive(false); if (SelectedObjs.selectedObj != null && TheLineType(SelectedObjs.selectedObj.GetComponent().gameObjType)) { gameObject.SetActive(true); transform.Find("Text").GetComponent().text = SelectedObjs.selectedObj.GetComponent().LineLenght.ToString("0.00") + "米"; } } public bool TheLineType(CloneObjType type) { //if (CloneObjType.OrdinaryHose == type || CloneObjType.ScintillationHose == type) //{ // return true; //} return false; } }