Prechádzať zdrojové kódy

屏蔽掉闸站和泵站以外的详细信息按钮

Void_F 9 mesiacov pred
rodič
commit
8f57dd3c4c

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 98 - 1
Assets/Scene 1.unity


+ 18 - 1
Assets/Scripts/UI/UIView/3D/GCZLLayer.cs

@@ -122,6 +122,7 @@ public class GCZLLayer : MonoBehaviour
                     GameObject obj = Instantiate(informationPrefab);
                     string realName = GlobalData.layerUnitDatas[i].name;
                     string priName = GlobalData.layerUnitDatas[i].name_pri;
+                    var objType = GlobalData.layerUnitDatas[i].type;
                     string className = GlobalData.layerUnitDatas[i].GetTypeName();
                     obj.transform.SetParent(informationContent);
                     obj.transform.Find("Name").GetComponentInChildren<Text>().text = realName;
@@ -139,8 +140,15 @@ public class GCZLLayer : MonoBehaviour
                         
                         currentData = GlobalData.layerUnitDatas[dataIndex];
                         StaticLod.instance.OnFoucusStatic(priName);
+                        if (objType == LayerUnitType.ZZ|| objType==LayerUnitType.BZ)
+                        {
+                            Info_DetailButton.gameObject.SetActive(true);
+                        }
+                        else
+                        {
+                            Info_DetailButton.gameObject.SetActive(false);
+                        }
                         ShowInfoPanelData();
-
                     }); 
                 }
             }
@@ -153,6 +161,7 @@ public class GCZLLayer : MonoBehaviour
                     GameObject obj = Instantiate(informationPrefab);
                     string realName = GlobalData.layerUnitDatas[i].name;
                     string priName = GlobalData.layerUnitDatas[i].name_pri;
+                    var objType = GlobalData.layerUnitDatas[i].type;
                     string className = GlobalData.layerUnitDatas[i].GetTypeName();
                     obj.transform.SetParent(informationContent);
                     obj.transform.Find("Name").GetComponentInChildren<Text>().text = realName;
@@ -168,6 +177,14 @@ public class GCZLLayer : MonoBehaviour
                     {
                         currentData = GlobalData.layerUnitDatas[dataIndex];
                         StaticLod.instance.OnFoucusStatic(priName);
+                        if (objType == LayerUnitType.ZZ|| objType==LayerUnitType.BZ)
+                        {
+                            Info_DetailButton.gameObject.SetActive(true);
+                        }
+                        else
+                        {
+                            Info_DetailButton.gameObject.SetActive(false);
+                        }
                         ShowInfoPanelData();
                     });
                 }

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov