Переглянути джерело

1.单击付费倒计时翻译

slambb 10 місяців тому
батько
коміт
b49a6101f2

+ 8 - 2
Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/cn.json

@@ -695,6 +695,12 @@
   "Sharpness": "锐度",
   "Gamma": "伽玛",
   "BacklightCompensation": "背光补偿",
-  "Gain": "增益"
-
+  "Gain": "增益",
+
+  //支付提示
+  "CoinContinueGame": "投币继续游戏\n{0}S",
+  "RemainingTime": "剩余时间{0}",
+  "CoinsInfo": "币:{0}/{1}",
+  "Seconds": "秒",
+  "Minutes": "分"
 }

+ 8 - 1
Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/en.json

@@ -747,6 +747,13 @@
   "Sharpness": "Sharpness",
   "Gamma": "Gamma",
   "BacklightCompensation": "Backlight Compensation",
-  "Gain": "Gain"
+  "Gain": "Gain",
+
+  //支付提示
+  "CoinContinueGame": "Insert coin to continue game\n{0}s",
+  "RemainingTime": "Remaining time {0}",
+  "CoinsInfo": "Coins: {0}/{1}",
+  "Seconds": "s",
+  "Minutes": "m "
 
 }

+ 15 - 4
Assets/BowArrow/Scripts/Standalone/GameTimeCounterSA.cs

@@ -12,8 +12,17 @@ public class GameTimeCounterSA : MonoBehaviour
     long _pauseTimePoint;
     const long PayTimeCountDown = 10 * 1000;
 
+    string coinContinueGameUnit;
+    string remainingTimeUnit;
+    string minutesUnit;
+    string secondsUnit;
     void Start()
     {
+        coinContinueGameUnit = TextAutoLanguage2.GetTextByKey("CoinContinueGame");
+        remainingTimeUnit = TextAutoLanguage2.GetTextByKey("RemainingTime");
+        minutesUnit = TextAutoLanguage2.GetTextByKey("Minutes");
+        secondsUnit = TextAutoLanguage2.GetTextByKey("Seconds");
+
         StandaloneAPI.StartGameTimeCountDown();
     }
 
@@ -27,7 +36,8 @@ public class GameTimeCounterSA : MonoBehaviour
         }
 
         StandaloneAPI.DoGameTimeCountDown();
-        playTimeText.text = string.Format("剩余时间{0}", GetTimeStr());
+        //"剩余时间{0}"
+        playTimeText.text = string.Format(remainingTimeUnit, GetTimeStr());
         if (StandaloneAPI.GetGameTimeCountDown() > 0)
         {
             if (_paused)
@@ -48,7 +58,8 @@ public class GameTimeCounterSA : MonoBehaviour
             }
             long t = PayTimeCountDown - (JCUnityLib.TimeUtils.GetTimestamp() - _pauseTimePoint);
             if (t <= 0) t = 0;
-            payTimeCountDownText.text = string.Format("投币继续游戏\n{0}S", t / 1000);
+            //"投币继续游戏\n{0}S"
+            payTimeCountDownText.text = string.Format(coinContinueGameUnit, t / 1000);
             if (t == 0) StandaloneAPI.ForceBackHome();
         }
         //#if UNITY_EDITOR
@@ -61,8 +72,8 @@ public class GameTimeCounterSA : MonoBehaviour
         long second = StandaloneAPI.GetGameTimeCountDown() / 1000;
         long minute = second / 60;
         second = second % 60;
-        string str = second + "秒";
-        if (minute > 0) str = minute + "分" + str;
+        string str = second + secondsUnit;//"秒";
+        if (minute > 0) str = minute + minutesUnit + str; //"分"
         return str;
     }
 }