Bladeren bron

Merge remote-tracking branch 'remotes/origin/master' into insertcoin

# Conflicts:
#	Assets/BowArrow/Scripts/Standalone/GameTimeCounterSA.cs
投币翻译部分处理
slambb 10 maanden geleden
bovenliggende
commit
cbbfdb1dd3

+ 77 - 13
Assets/BowArrow/Resources/Textures/GameIcon/Prefabs/Views/Home/HomeView.prefab

@@ -266,15 +266,14 @@ RectTransform:
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
-  m_Children:
-  - {fileID: 8864066561676414784}
-  m_Father: {fileID: 2100941116812051735}
-  m_RootOrder: 1
+  m_Children: []
+  m_Father: {fileID: 5828918567583551455}
+  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 520, y: 100}
+  m_SizeDelta: {x: 520, y: 140}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &3622182153959318751
 CanvasRenderer:
@@ -314,10 +313,10 @@ MonoBehaviour:
     m_Alignment: 4
     m_AlignByGeometry: 0
     m_RichText: 1
-    m_HorizontalOverflow: 1
+    m_HorizontalOverflow: 0
     m_VerticalOverflow: 1
     m_LineSpacing: 1
-  m_Text: XXXXX
+  m_Text: XXXXXXXXX
 --- !u!114 &8096582222177674154
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -11148,6 +11147,71 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   m_HorizontalFit: 2
   m_VerticalFit: 2
+--- !u!1 &7349869700471202933
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 5828918567583551455}
+  - component: {fileID: 9207226183996669295}
+  m_Layer: 5
+  m_Name: TtimeLayout
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &5828918567583551455
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 7349869700471202933}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children:
+  - {fileID: 8828062164267254224}
+  - {fileID: 8864066561676414784}
+  m_Father: {fileID: 2100941116812051735}
+  m_RootOrder: 1
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 0, y: 0}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 520, y: 100}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &9207226183996669295
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 7349869700471202933}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Padding:
+    m_Left: 0
+    m_Right: 0
+    m_Top: 0
+    m_Bottom: 0
+  m_ChildAlignment: 1
+  m_Spacing: 0
+  m_ChildForceExpandWidth: 1
+  m_ChildForceExpandHeight: 1
+  m_ChildControlWidth: 0
+  m_ChildControlHeight: 0
+  m_ChildScaleWidth: 0
+  m_ChildScaleHeight: 0
+  m_ReverseArrangement: 0
 --- !u!1 &7367123130748397549
 GameObject:
   m_ObjectHideFlags: 0
@@ -11179,12 +11243,12 @@ RectTransform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
-  m_Father: {fileID: 8828062164267254224}
-  m_RootOrder: 0
+  m_Father: {fileID: 5828918567583551455}
+  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 1}
-  m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 414.25, y: -100}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 0, y: 0}
+  m_AnchoredPosition: {x: 0, y: 0}
   m_SizeDelta: {x: 308.5, y: 100}
   m_Pivot: {x: 1, y: 1}
 --- !u!222 &9092469229125897648
@@ -13875,7 +13939,7 @@ RectTransform:
   m_ConstrainProportionsScale: 0
   m_Children:
   - {fileID: 4563341404592455502}
-  - {fileID: 8828062164267254224}
+  - {fileID: 5828918567583551455}
   m_Father: {fileID: 7022781866214807768}
   m_RootOrder: 16
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

+ 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 "
 
 }

+ 8 - 5
Assets/BowArrow/Scripts/ShowGameTime.cs

@@ -9,6 +9,7 @@ public class ShowGameTime : MonoBehaviour
     [SerializeField] Text cointCountText;
     const long PayTimeCountDown = 60 * 1000;
 
+    //string coinContinueGameUnit;
     private void Start()
     {
         //StandaloneAPI.StartGameTimeCountDown();
@@ -25,11 +26,13 @@ public class ShowGameTime : MonoBehaviour
         }
 
         StandaloneAPI.DoGameTimeCountDown();
-        playTimeText.text = string.Format("剩余时间{0}", GetTimeStr());
+        //"剩余时间{0}"
+        playTimeText.text = string.Format(TextAutoLanguage2.GetTextByKey("RemainingTime"), GetTimeStr());
 
         if (UserSettings.ins != null) {
-           // Debug.Log(StandaloneAPI.CoinCount + " " + UserSettings.ins.PerRoundCoin);
-            cointCountText.text = string.Format("币:{0}/{1}", StandaloneAPI.CoinCount, UserSettings.ins.PerRoundCoin);
+            // Debug.Log(StandaloneAPI.CoinCount + " " + UserSettings.ins.PerRoundCoin);
+            //"币:{0}/{1}"
+            cointCountText.text = string.Format(TextAutoLanguage2.GetTextByKey("CoinsInfo"), StandaloneAPI.CoinCount, UserSettings.ins.PerRoundCoin);
         }
     }
 
@@ -38,8 +41,8 @@ public class ShowGameTime : 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 + TextAutoLanguage2.GetTextByKey("Seconds");// "秒";
+        if (minute > 0) str = minute + TextAutoLanguage2.GetTextByKey("Minutes") + str;// "分"
         return str;
     }
 }

+ 19 - 6
Assets/BowArrow/Scripts/Standalone/GameTimeCounterSA.cs

@@ -13,9 +13,19 @@ public class GameTimeCounterSA : MonoBehaviour
     long _pauseTimePoint;
     const long PayTimeCountDown = 60 * 1000;
     public RawImage QRimage;
+    string coinContinueGameUnit;
+    string remainingTimeUnit;
+    string minutesUnit;
+    string secondsUnit;
+    string coinsUnit;
     void Start()
     {
-        payMask.SetActive(false);
+        payMask.SetActive(false);        
+        coinContinueGameUnit = TextAutoLanguage2.GetTextByKey("CoinContinueGame");
+        remainingTimeUnit = TextAutoLanguage2.GetTextByKey("RemainingTime");
+        minutesUnit = TextAutoLanguage2.GetTextByKey("Minutes");
+        secondsUnit = TextAutoLanguage2.GetTextByKey("Seconds");
+        coinsUnit = TextAutoLanguage2.GetTextByKey("CoinsInfo");
         StandaloneAPI.StartGameTimeCountDown();
         QRimage.texture = StandaloneAPI.GetQR();
     }
@@ -30,7 +40,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)
@@ -51,10 +62,12 @@ 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 (UserSettings.ins != null)
             {
-                cointCountText.text = string.Format("币:{0}/{1}", StandaloneAPI.CoinCount, UserSettings.ins.PerRoundCoin);
+                //"币:{0}/{1}"
+                cointCountText.text = string.Format(coinsUnit, StandaloneAPI.CoinCount, UserSettings.ins.PerRoundCoin);
             }
             if (t == 0) StandaloneAPI.ForceBackHome();
         }
@@ -68,8 +81,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;
     }
 }