瀏覽代碼

Update YZTLayer.cs

lantiannb 1 天之前
父節點
當前提交
9e58855ea7
共有 1 個文件被更改,包括 4 次插入2 次删除
  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;
             }