lvjincheng 3 năm trước cách đây
mục cha
commit
5feee9f8dd

+ 38 - 6
Assets/BowArrow/Resources/Prefabs/Popups/PKInviteNotice.prefab

@@ -311,6 +311,7 @@ GameObject:
   - component: {fileID: 930672998266023273}
   - component: {fileID: 930672998266023275}
   - component: {fileID: 930672998266023274}
+  - component: {fileID: 8753661119079560119}
   m_Layer: 5
   m_Name: Text
   m_TagString: Untagged
@@ -335,7 +336,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
   m_AnchoredPosition: {x: 0, y: 1.65}
-  m_SizeDelta: {x: 0, y: -0.29999995}
+  m_SizeDelta: {x: -10, y: -0.29999995}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &930672998266023275
 CanvasRenderer:
@@ -369,9 +370,9 @@ MonoBehaviour:
     m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
     m_FontSize: 24
     m_FontStyle: 0
-    m_BestFit: 0
+    m_BestFit: 1
     m_MinSize: 1
-    m_MaxSize: 40
+    m_MaxSize: 24
     m_Alignment: 4
     m_AlignByGeometry: 0
     m_RichText: 1
@@ -379,6 +380,21 @@ MonoBehaviour:
     m_VerticalOverflow: 0
     m_LineSpacing: 1
   m_Text: "\u62D2\u7EDD"
+--- !u!114 &8753661119079560119
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 930672998266023272}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 0f4efe98aab6c6b41a7ee1f4c49df27b, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  textKey: common_reject
+  layoutRebuildObject: {fileID: 0}
+  languageFontSizes: []
 --- !u!1 &930672998493596418
 GameObject:
   m_ObjectHideFlags: 0
@@ -480,6 +496,7 @@ GameObject:
   - component: {fileID: 930672998660870536}
   - component: {fileID: 930672998660870538}
   - component: {fileID: 930672998660870537}
+  - component: {fileID: 6367455176559444625}
   m_Layer: 5
   m_Name: Text
   m_TagString: Untagged
@@ -504,7 +521,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
   m_AnchoredPosition: {x: 0, y: 1.65}
-  m_SizeDelta: {x: 0, y: -0.29999995}
+  m_SizeDelta: {x: -10, y: -0.29999995}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &930672998660870538
 CanvasRenderer:
@@ -538,9 +555,9 @@ MonoBehaviour:
     m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
     m_FontSize: 24
     m_FontStyle: 0
-    m_BestFit: 0
+    m_BestFit: 1
     m_MinSize: 1
-    m_MaxSize: 40
+    m_MaxSize: 24
     m_Alignment: 4
     m_AlignByGeometry: 0
     m_RichText: 1
@@ -548,6 +565,21 @@ MonoBehaviour:
     m_VerticalOverflow: 0
     m_LineSpacing: 1
   m_Text: "\u540C\u610F"
+--- !u!114 &6367455176559444625
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 930672998660870551}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 0f4efe98aab6c6b41a7ee1f4c49df27b, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  textKey: common_agree
+  layoutRebuildObject: {fileID: 0}
+  languageFontSizes: []
 --- !u!1 &930672998806955876
 GameObject:
   m_ObjectHideFlags: 0

+ 96 - 16
Assets/BowArrow/Scenes/GameChallengeScene/GameChallenge.unity

@@ -7012,6 +7012,7 @@ GameObject:
   - component: {fileID: 280159645}
   - component: {fileID: 280159644}
   - component: {fileID: 280159646}
+  - component: {fileID: 280159647}
   m_Layer: 5
   m_Name: Text
   m_TagString: Untagged
@@ -7068,7 +7069,7 @@ MonoBehaviour:
     m_Alignment: 4
     m_AlignByGeometry: 0
     m_RichText: 1
-    m_HorizontalOverflow: 0
+    m_HorizontalOverflow: 1
     m_VerticalOverflow: 0
     m_LineSpacing: 1
   m_Text: "\u80DC\u5229"
@@ -7095,6 +7096,21 @@ MonoBehaviour:
   m_EffectColor: {r: 0.56078434, g: 0.11372549, b: 0.09803922, a: 1}
   m_EffectDistance: {x: 2, y: 2}
   m_UseGraphicAlpha: 0
+--- !u!114 &280159647
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 280159642}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 0f4efe98aab6c6b41a7ee1f4c49df27b, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  textKey: game_settle_win
+  layoutRebuildObject: {fileID: 0}
+  languageFontSizes: []
 --- !u!1001 &281839869
 PrefabInstance:
   m_ObjectHideFlags: 0
@@ -9156,6 +9172,7 @@ GameObject:
   - component: {fileID: 391062749}
   - component: {fileID: 391062748}
   - component: {fileID: 391062747}
+  - component: {fileID: 391062750}
   m_Layer: 5
   m_Name: Text
   m_TagString: Untagged
@@ -9227,7 +9244,7 @@ MonoBehaviour:
     m_Alignment: 4
     m_AlignByGeometry: 0
     m_RichText: 1
-    m_HorizontalOverflow: 0
+    m_HorizontalOverflow: 1
     m_VerticalOverflow: 0
     m_LineSpacing: 1
   m_Text: "\u5931\u8D25"
@@ -9239,6 +9256,21 @@ CanvasRenderer:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 391062745}
   m_CullTransparentMesh: 1
+--- !u!114 &391062750
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 391062745}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 0f4efe98aab6c6b41a7ee1f4c49df27b, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  textKey: game_settle_fail
+  layoutRebuildObject: {fileID: 0}
+  languageFontSizes: []
 --- !u!1 &392428879
 GameObject:
   m_ObjectHideFlags: 0
@@ -15238,7 +15270,7 @@ MonoBehaviour:
     m_Alignment: 3
     m_AlignByGeometry: 0
     m_RichText: 1
-    m_HorizontalOverflow: 0
+    m_HorizontalOverflow: 1
     m_VerticalOverflow: 0
     m_LineSpacing: 1
   m_Text: "\u5269\u4F59\u7BAD\u77E2: 10/10"
@@ -22439,7 +22471,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 30, y: 0}
+  m_AnchoredPosition: {x: 29.32886, y: 0}
   m_SizeDelta: {x: 0, y: 33}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &1047161075
@@ -25994,7 +26026,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 30, y: 0}
+  m_AnchoredPosition: {x: 29.32886, y: 0}
   m_SizeDelta: {x: 0, y: 33}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &1203594963
@@ -28694,6 +28726,7 @@ GameObject:
   - component: {fileID: 1358723701}
   - component: {fileID: 1358723703}
   - component: {fileID: 1358723702}
+  - component: {fileID: 1358723704}
   m_Layer: 5
   m_Name: Text
   m_TagString: Untagged
@@ -28718,7 +28751,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 0, y: 0}
+  m_SizeDelta: {x: -10, y: -10}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &1358723702
 MonoBehaviour:
@@ -28744,9 +28777,9 @@ MonoBehaviour:
     m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
     m_FontSize: 24
     m_FontStyle: 0
-    m_BestFit: 0
+    m_BestFit: 1
     m_MinSize: 2
-    m_MaxSize: 40
+    m_MaxSize: 24
     m_Alignment: 4
     m_AlignByGeometry: 0
     m_RichText: 1
@@ -28762,6 +28795,21 @@ CanvasRenderer:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1358723700}
   m_CullTransparentMesh: 1
+--- !u!114 &1358723704
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1358723700}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 0f4efe98aab6c6b41a7ee1f4c49df27b, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  textKey: game_settle_btn_back-home
+  layoutRebuildObject: {fileID: 0}
+  languageFontSizes: []
 --- !u!1001 &1361860292
 PrefabInstance:
   m_ObjectHideFlags: 0
@@ -32421,7 +32469,7 @@ MonoBehaviour:
     m_Alignment: 3
     m_AlignByGeometry: 0
     m_RichText: 1
-    m_HorizontalOverflow: 0
+    m_HorizontalOverflow: 1
     m_VerticalOverflow: 0
     m_LineSpacing: 1
   m_Text: "\u5269\u4F59\u52A8\u7269: 10/10"
@@ -32784,6 +32832,7 @@ GameObject:
   - component: {fileID: 1544215145}
   - component: {fileID: 1544215147}
   - component: {fileID: 1544215146}
+  - component: {fileID: 1544215148}
   m_Layer: 5
   m_Name: Text
   m_TagString: Untagged
@@ -32808,7 +32857,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 0, y: 0}
+  m_SizeDelta: {x: -10, y: -10}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &1544215146
 MonoBehaviour:
@@ -32834,9 +32883,9 @@ MonoBehaviour:
     m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
     m_FontSize: 24
     m_FontStyle: 0
-    m_BestFit: 0
+    m_BestFit: 1
     m_MinSize: 2
-    m_MaxSize: 40
+    m_MaxSize: 24
     m_Alignment: 4
     m_AlignByGeometry: 0
     m_RichText: 1
@@ -32852,6 +32901,21 @@ CanvasRenderer:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1544215144}
   m_CullTransparentMesh: 1
+--- !u!114 &1544215148
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1544215144}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 0f4efe98aab6c6b41a7ee1f4c49df27b, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  textKey: game_settle_btn_try-again
+  layoutRebuildObject: {fileID: 0}
+  languageFontSizes: []
 --- !u!1 &1544605563 stripped
 GameObject:
   m_CorrespondingSourceObject: {fileID: 184764, guid: c34dd698ff306f0439f184ee015a6a5e, type: 3}
@@ -36354,6 +36418,7 @@ GameObject:
   - component: {fileID: 1725321790}
   - component: {fileID: 1725321792}
   - component: {fileID: 1725321791}
+  - component: {fileID: 1725321793}
   m_Layer: 5
   m_Name: Text
   m_TagString: Untagged
@@ -36378,7 +36443,7 @@ RectTransform:
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 1, y: 1}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 0, y: 0}
+  m_SizeDelta: {x: -10, y: -10}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &1725321791
 MonoBehaviour:
@@ -36404,9 +36469,9 @@ MonoBehaviour:
     m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
     m_FontSize: 24
     m_FontStyle: 0
-    m_BestFit: 0
+    m_BestFit: 1
     m_MinSize: 2
-    m_MaxSize: 40
+    m_MaxSize: 24
     m_Alignment: 4
     m_AlignByGeometry: 0
     m_RichText: 1
@@ -36422,6 +36487,21 @@ CanvasRenderer:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1725321789}
   m_CullTransparentMesh: 1
+--- !u!114 &1725321793
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1725321789}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 0f4efe98aab6c6b41a7ee1f4c49df27b, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  textKey: game_settle_btn_next-level
+  layoutRebuildObject: {fileID: 0}
+  languageFontSizes: []
 --- !u!1001 &1728539713
 PrefabInstance:
   m_ObjectHideFlags: 0
@@ -45027,7 +45107,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 50, y: 0}
+  m_AnchoredPosition: {x: 48.65772, y: 0}
   m_SizeDelta: {x: 0, y: 33}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &2142579590

+ 14 - 3
Assets/BowArrow/Scenes/GameChallengeScene/HunterGameView.cs

@@ -39,24 +39,35 @@ public class HunterGameView : MonoBehaviour
         }
     }
 
-    string[] animalNames = {"野兔", "野鸡", "野狼"};
+    string[] animalNames = null;
     [SerializeField] Text animalCountValue;
     [SerializeField] Text animalCountText;
     [SerializeField] Image animalCountProgress;
     void RenderAnimalCount() {
+        if (animalNames == null) {
+            animalNames = new string[]{
+                TextAutoLanguage2.GetTextByKey("game_challenge_surplus_rabbit"), 
+                TextAutoLanguage2.GetTextByKey("game_challenge_surplus_pheasant"), 
+                TextAutoLanguage2.GetTextByKey("game_challenge_surplus_wolf")
+            };
+        }
         string animalName = animalNames[gameMode.animalTypeID];
         animalCountValue.text = gameMode.animalCount.ToString();
-        animalCountText.text = $"剩余{animalName}: {gameMode.animalCount}/{gameMode.animalCountMax}";
+        animalCountText.text = $"{animalName}: {gameMode.animalCount}/{gameMode.animalCountMax}";
         animalCountProgress.fillAmount = (float)gameMode.animalCount / gameMode.animalCountMax; 
     }
 
     [SerializeField] Text arrowCountValue;
     [SerializeField] Text arrowCountText;
     [SerializeField] Image arrowCountProgress;
+    string str_surplus_arrow = null;
     
     void RenderArrowCount() {
+        if (str_surplus_arrow == null) {
+            str_surplus_arrow = TextAutoLanguage2.GetTextByKey("game_challenge_surplus_arrow");
+        }
         arrowCountValue.text = gameMode.arrowCount.ToString();
-        arrowCountText.text = $"剩余箭矢: {gameMode.arrowCount}/{gameMode.arrowCountMax}";
+        arrowCountText.text = $"{str_surplus_arrow}: {gameMode.arrowCount}/{gameMode.arrowCountMax}";
         arrowCountProgress.fillAmount = (float)gameMode.arrowCount / gameMode.arrowCountMax; 
     }
 

+ 2 - 1
Assets/BowArrow/Scenes/GameChallengeScene/LocalPK/HunterGameView_LocalPK.cs

@@ -82,7 +82,8 @@ public class HunterGameView_LocalPK : MonoBehaviour
 
     void RenderScore(int posNum, int score) {
         hitScores[posNum] = score;
-        this.transform.Find("ScoreBox/Item" + posNum + "/Score").GetComponent<Text>().text = "得分: " + score.ToString();
+        this.transform.Find("ScoreBox/Item" + posNum + "/Score").GetComponent<Text>().text = 
+            System.String.Format(TextAutoLanguage2.GetTextByKey("game_challenge_pk_score"), score);
     }
 
     public void ShowPlayerDie(bool[] playerDieList) {

+ 14 - 0
Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/cn.json

@@ -59,6 +59,20 @@
     "pk-match_match-waiting1": "正在等待好友加入游戏···",
     "pk-match_match-waiting2": "正在等待对方加入游戏···",
     "pk-match_match-waiting3": "正在搜索实力相当的对手···",
+    "game_settle_win": "胜利",
+    "game_settle_fail": "失败",
+    "game_settle_btn_try-again": "再来一次",
+    "game_settle_btn_next-level": "下一关",
+    "game_settle_btn_back-home": "返回主页",
+    "game_challenge_pk_score": "得分: {0}",
+    "game_challenge_surplus_rabbit": "剩余野兔",
+    "game_challenge_surplus_pheasant": "剩余野鸡",
+    "game_challenge_surplus_wolf": "剩余野狼",
+    "game_challenge_surplus_arrow": "剩余箭矢",
+    "game_crosshair_outbound_0": "瞄准方向已超出视野范围,请将弓往右移动!",
+    "game_crosshair_outbound_1": "瞄准方向已超出视野范围,请将弓往左移动!",
+    "game_crosshair_outbound_2": "瞄准方向已超出视野范围,请将弓往下移动!",
+    "game_crosshair_outbound_3": "瞄准方向已超出视野范围,请将弓往上移动!",
     "tip_about-us": "关于我们-智能弓箭App!",
     "tip_friend-receive-request": "收到好友添加请求,可到好友界面查看!",
     "tip_pk_gametype_1": "静止靶PK",

+ 14 - 0
Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/en.json

@@ -59,6 +59,20 @@
     "pk-match_match-waiting1": "Waiting for friends to join the game···",
     "pk-match_match-waiting2": "Waiting for each other to join the game···",
     "pk-match_match-waiting3": "Searching for opponents of equal strength···",
+    "game_settle_win": "Win",
+    "game_settle_fail": "Fail",
+    "game_settle_btn_try-again": "Try Again",
+    "game_settle_btn_next-level": "Next Level",
+    "game_settle_btn_back-home": "Back Home",
+    "game_challenge_pk_score": "Score: {0}",
+    "game_challenge_surplus_rabbit": "Rabbit",
+    "game_challenge_surplus_pheasant": "Pheasant",
+    "game_challenge_surplus_wolf": "Wolf",
+    "game_challenge_surplus_arrow": "Arrows",
+    "game_crosshair_outbound_0": "Aim out bound, please move the bow to the right!",
+    "game_crosshair_outbound_1": "Aim out bound, please move the bow to the left!",
+    "game_crosshair_outbound_2": "Aim out bound, please move the bow to the down!",
+    "game_crosshair_outbound_3": "Aim out bound, please move the bow to the up!",
     "tip_about-us": "About us - Smart bow app !",
     "tip_friend-receive-request": "Has friend requet, can check at friend view!",
     "tip_pk_gametype_1": "Fixed Target PK",

+ 10 - 6
Assets/BowArrow/Scripts/Game/CrossHairOutBoundChecker.cs

@@ -6,14 +6,18 @@ using UnityEngine.UI;
 public class CrossHairOutBoundChecker : MonoBehaviour
 {
     [SerializeField] GameObject outTip;
-    string[] tips = {
-        "瞄准方向已超出视野范围,请将弓往右移动!",
-        "瞄准方向已超出视野范围,请将弓往左移动!",
-        "瞄准方向已超出视野范围,请将弓往下移动!",
-        "瞄准方向已超出视野范围,请将弓往上移动!",
-    };
+    string[] tips = null;
     int tipIndex = -1;
 
+    void Start() {
+        tips = new string[]{
+            TextAutoLanguage2.GetTextByKey("game_crosshair_outbound_0"),
+            TextAutoLanguage2.GetTextByKey("game_crosshair_outbound_1"),
+            TextAutoLanguage2.GetTextByKey("game_crosshair_outbound_2"),
+            TextAutoLanguage2.GetTextByKey("game_crosshair_outbound_3"),
+        };
+    }
+
     void Update()
     {
         int newTipIndex = -1;