Explorar el Código

Update YZTLayer.cs

lantiannb hace 1 día
padre
commit
9e58855ea7
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4 2
      Assets/Scripts/UI/UIView/YZT/YZTLayer.cs

+ 4 - 2
Assets/Scripts/UI/UIView/YZT/YZTLayer.cs

@@ -864,11 +864,13 @@ public class YZTLayer : YZTRootLayer
 
     public static int FindIndexByHotPointName(string name)
     {
-        Debug.Log(name);
+        string newName = name.Replace("(闸下)", "(下)").Replace("(闸上)", "(上)").Replace("(闸上)", "上").Replace("(闸下)", "下");
+        newName = newName.TrimEnd();
+        Debug.Log(newName);
         for (int i = 0; i < GlobalData.swDatas.Count; i++)
         {
             //Debug.Log(GlobalData.swDatas[i].stnm);
-            if (GlobalData.swDatas[i].stnm.Trim() == name.Trim())
+            if (GlobalData.swDatas[i].stnm.Trim() == newName.Trim())
             {
                 return i;
             }