瀏覽代碼

主页反曲弓

lvjincheng 4 年之前
父節點
當前提交
dd2f359220
共有 2 個文件被更改,包括 5 次插入2 次删除
  1. 3 1
      Assets/BowArrow/Scripts/Components/TextAutoLanguage.cs
  2. 2 1
      Assets/BowArrow/Scripts/View/HomeView.cs

+ 3 - 1
Assets/BowArrow/Scripts/Components/TextAutoLanguage.cs

@@ -33,7 +33,7 @@ public class TextAutoLanguage : MonoBehaviour
         {
             try {
                 textAutoLanguage.ApplyText();    
-            } catch (Exception) {}
+            } catch (Exception e) { Debug.LogError(e.Message); }
         }
     }
 
@@ -275,6 +275,7 @@ class LanguageDefault {
     public string text111001 = "射箭时,射速增加{0}倍。";
 
     //设备名称
+    public string text200000 = "反曲弓";
     public string text201000 = "18磅反曲弓";
     public string text201001 = "25磅反曲弓";
     public string text201002 = "碳纤维箭";
@@ -446,6 +447,7 @@ class LanguageEnglish : LanguageDefault {
     public new string text111001 = "In archery, the speed increases by {0} times.";
 
     //设备名称
+    public new string text200000 = "Recurve Bow";
     public new string text201000 = "18 Pound Bow";
     public new string text201001 = "25 Pound Bow";
     public new string text201002 = "Carbon Giber Arrow";

+ 2 - 1
Assets/BowArrow/Scripts/View/HomeView.cs

@@ -47,7 +47,8 @@ public class HomeView : MonoBehaviour
     {
         try {
             (DeviceInfo bowInfo, DeviceInfo arrowInfo) = DeviceMgr.ins.GetCurrentBowArrowInfo();
-            this.transform.Find("ShowBow/Text").GetComponent<TextAutoLanguage>().SetText(bowInfo.config.name);
+            // this.transform.Find("ShowBow/Text").GetComponent<TextAutoLanguage>().SetText(bowInfo.config.name);
+            this.transform.Find("ShowBow/Text").GetComponent<TextAutoLanguage>().SetText(200000);
             this.transform.Find("ShowArrow/Text").GetComponent<TextAutoLanguage>().SetText(arrowInfo.config.name);
         } catch (System.Exception) {}
     }