Ver código fonte

Update YZTLayer.cs

lantiannb 1 dia atrás
pai
commit
9e58855ea7
1 arquivos alterados com 4 adições e 2 exclusões
  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;
             }