lvjincheng 3 лет назад
Родитель
Сommit
04520c8e0f

+ 1 - 0
Assets/BowArrow/Modules/NewUserGuider/NewUserGuiderManager.cs

@@ -532,6 +532,7 @@ public class NewUserGuiderManager : MonoBehaviour
         "教程结束",
     });
 
+    [ContextMenu("执行当前配置")]
     void ExecuteCurConfig() {
         InitConfigs();
         NewUserGuiderConfig config = configs[curConfigKey];

+ 11 - 124
Assets/BowArrow/Resources/Prefabs/Views/AutoResetView.prefab

@@ -1,116 +1,5 @@
 %YAML 1.1
 %TAG !u! tag:unity3d.com,2011:
---- !u!1 &913741810747484569
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 4267706547543578101}
-  - component: {fileID: 2142523979857591930}
-  - component: {fileID: 3667140392112171349}
-  - component: {fileID: 2205873919772340771}
-  - component: {fileID: 5793278791225049083}
-  m_Layer: 5
-  m_Name: Text
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!224 &4267706547543578101
-RectTransform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 913741810747484569}
-  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_Children: []
-  m_Father: {fileID: 8541278423340140544}
-  m_RootOrder: 0
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0.5, y: 0.5}
-  m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: 0, y: -120}
-  m_SizeDelta: {x: 160, y: 30}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &2142523979857591930
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 913741810747484569}
-  m_CullTransparentMesh: 1
---- !u!114 &3667140392112171349
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 913741810747484569}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 1}
-  m_RaycastTarget: 1
-  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
-  m_Maskable: 1
-  m_OnCullStateChanged:
-    m_PersistentCalls:
-      m_Calls: []
-  m_FontData:
-    m_Font: {fileID: 12800000, guid: 1ad2cf6c2f09744489d8c60b3fe3bab2, type: 3}
-    m_FontSize: 30
-    m_FontStyle: 0
-    m_BestFit: 0
-    m_MinSize: 2
-    m_MaxSize: 40
-    m_Alignment: 1
-    m_AlignByGeometry: 0
-    m_RichText: 1
-    m_HorizontalOverflow: 1
-    m_VerticalOverflow: 1
-    m_LineSpacing: 1
-  m_Text: "\u51C6\u5907\u6821\u51C6"
---- !u!114 &2205873919772340771
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 913741810747484569}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_EffectColor: {r: 0.5754717, g: 0.20141229, b: 0, a: 1}
-  m_EffectDistance: {x: 1, y: -1}
-  m_UseGraphicAlpha: 1
---- !u!114 &5793278791225049083
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 913741810747484569}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 0f4efe98aab6c6b41a7ee1f4c49df27b, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  textKey: aim-auto-reset_tip1
-  layoutRebuildObject: {fileID: 0}
-  languageFontSizes: []
 --- !u!1 &1250271963543843501
 GameObject:
   m_ObjectHideFlags: 0
@@ -128,7 +17,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 0
+  m_IsActive: 1
 --- !u!224 &5753555721075870674
 RectTransform:
   m_ObjectHideFlags: 0
@@ -141,11 +30,11 @@ RectTransform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_Children: []
   m_Father: {fileID: 8541278423340140544}
-  m_RootOrder: 1
+  m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: -327, y: -83}
+  m_AnchoredPosition: {x: -275, y: -83}
   m_SizeDelta: {x: 278, y: 293}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &720398540035664239
@@ -219,10 +108,10 @@ RectTransform:
   m_Father: {fileID: 4272915218284800337}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0, y: 1}
-  m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: 60, y: -54.472363}
-  m_SizeDelta: {x: 0, y: 28.944725}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 0, y: 0}
+  m_AnchoredPosition: {x: 0, y: 0}
+  m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &1135559010089599251
 CanvasRenderer:
@@ -278,7 +167,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 0f4efe98aab6c6b41a7ee1f4c49df27b, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  textKey: aim-auto-reset_tip
+  textKey: "new-user-guider_tip_\u89C6\u89D2\u5F52\u4F4D-\u7784\u51C6"
   layoutRebuildObject: {fileID: 0}
   languageFontSizes: []
 --- !u!1 &5733520577226223840
@@ -300,7 +189,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 0
+  m_IsActive: 1
 --- !u!224 &4272915218284800337
 RectTransform:
   m_ObjectHideFlags: 0
@@ -314,12 +203,12 @@ RectTransform:
   m_Children:
   - {fileID: 1490023618661034890}
   m_Father: {fileID: 8541278423340140544}
-  m_RootOrder: 2
+  m_RootOrder: 1
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
   m_AnchoredPosition: {x: 0, y: 180}
-  m_SizeDelta: {x: 120, y: 108.944725}
+  m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &5629256948466215757
 CanvasRenderer:
@@ -430,7 +319,6 @@ RectTransform:
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 0, y: 0, z: 0}
   m_Children:
-  - {fileID: 4267706547543578101}
   - {fileID: 5753555721075870674}
   - {fileID: 4272915218284800337}
   m_Father: {fileID: 0}
@@ -514,4 +402,3 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: f9486d1d8655b1c42a3f3d70d5313b3b, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  prepareTipText: {fileID: 5793278791225049083}

+ 1 - 3
Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/cn.json

@@ -43,7 +43,7 @@
     "new-user-guider_tip_开始-限时游戏": "点击<color=#FFA500>“限时游戏”</color>选择游戏类型",
     "new-user-guider_tip_限时游戏-选择距离": "选择距离<color=#FFA500>“10米”</color>开始游戏吧!",
     "new-user-guider_tip_视角归位-触发": "点击<color=#FFA500>视角归位按键之后,立刻以标准射箭\n姿势瞄准靶心</color>,3秒后完成视角的自动归位。",
-    "new-user-guider_tip_视角归位-瞄准": "请参考图中姿势,<color=#FFA500>立即瞄准靶心</color>,\n3秒后完成视角的自动归位。",
+    "new-user-guider_tip_视角归位-瞄准": "请参考图中姿势,立即瞄准靶心,\n<size=40><color=#FFA500>{0}</color></size>秒后完成视角的自动归位。",
     "new-user-guider_tip_教程结束": "恭喜您完成了本次新手教程,下次如果还\n要<color=#FFA500>了解本教程</color>,请在<color=#FFA500>设置中查看新手指导</color>。",
     
     "setup_fix-game-bg": "固定游戏背景",
@@ -102,8 +102,6 @@
     "game_challenge_settle_again": "同一局再次开始",
     "game_challenge_settle_back": "返回上一页",
     "game_challenge_settle_next-level": "下一关",
-    "aim-auto-reset_tip": "请参考图中小人的姿势,<color=#FFA500>立即瞄准屏幕中\n的靶心</color>,3秒后完成视角的自动归位。",
-    "aim-auto-reset_tip1": "{0}秒后即将开始校准,请扶稳弓箭!",
     "agreement_user": "用户协议",
     "agreement_privacy": "隐私政策",
     "agreement_read_and_agree": "我已阅读并同意",

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

@@ -43,7 +43,7 @@
     "new-user-guider_tip_开始-限时游戏": "Click <color=#FFA500>\"Target\"</color> to select a game type",
     "new-user-guider_tip_限时游戏-选择距离": "Choose <color=#FFA500>\"10M\"</color> to start the game!",
     "new-user-guider_tip_视角归位-触发": "Click <color=#FFA500>the aim reset button, and immediately aim at the bull's-eye \nin the standard archery posture after pressing the button</color>, and then \ncomplete the automatic angle homing 3 seconds later.",
-    "new-user-guider_tip_视角归位-瞄准": "Please refer to the small person's \nposture in the figure, <color=#FFA500>immediately \naim at the bull's-eye in the screen</color>, \ncomplete the automatic homing of \nthe viewing angle in 3 seconds.",
+    "new-user-guider_tip_视角归位-瞄准": "Please refer to the pose in the figure, aim at the bull's-eye immediately, \nthe automatic homing of the viewing angle will be completed in <size=40><color=#FFA500>{0}</color></size> seconds.",
     "new-user-guider_tip_教程结束": "Congratulations on completing this novice tutorial. If you want to <color=#FFA500>know this \ntutorial</color> next time, please <color=#FFA500>see the novice guidance in the setup.</color>",
 
     "setup_fix-game-bg": "FixGameBG",
@@ -102,8 +102,6 @@
     "game_challenge_settle_again": "Try Again",
     "game_challenge_settle_back": "Exit",
     "game_challenge_settle_next-level": "Next Level",
-    "aim-auto-reset_tip": "Please refer to the small person's posture in the figure,\n<color=#FFA500>immediately aim at the bull's-eye in the screen</color>, complete\nthe automatic homing of the viewing angle in 3 seconds.",
-    "aim-auto-reset_tip1": "Calibration will start in {0} seconds,\nplease hold the bow!",
     "agreement_user": "User Agreement",
     "agreement_privacy": "Privacy Agreement",
     "agreement_read_and_agree": "I have read and agreed to the",

+ 18 - 8
Assets/BowArrow/Scripts/Expand/AutoResetView.cs

@@ -12,7 +12,6 @@ using UnityEngine.SceneManagement;
 */
 public class AutoResetView : MonoBehaviour
 {
-    [SerializeField] TextAutoLanguage2 prepareTipText;
     public static AutoResetView ins;
 
     public static void DoIdentity() {
@@ -32,12 +31,11 @@ public class AutoResetView : MonoBehaviour
     }
 
     void Start() {
-        if (SceneManager.GetActiveScene().name == "GameChallenge") {
-            transform.Find("IconHumanShoot").gameObject.SetActive(true);
-            transform.Find("FrameTip").gameObject.SetActive(true);
+        if (SceneManager.GetActiveScene().name == "Game") {
+            (transform.Find("IconHumanShoot") as RectTransform).anchoredPosition = new Vector2(-193, -85);
         }
-        prepareTipText.textFormatArgs = new object[]{Mathf.CeilToInt(prepareTime)};
-        prepareTipText.ApplyToText();
+        GetGuideTip().textFormatArgs = new object[]{showedPrepareTime = Mathf.CeilToInt(prepareTime)};
+        GetGuideTip().ApplyToText();
         ChallengeTargetForResetView.Show();
     }
 
@@ -48,6 +46,7 @@ public class AutoResetView : MonoBehaviour
     }
 
     float prepareTime = 3;
+    int showedPrepareTime;
 
     void Update() {
         prepareTime -= Time.deltaTime;
@@ -59,8 +58,19 @@ public class AutoResetView : MonoBehaviour
             catch (System.Exception) {}
             Destroy(gameObject);
         } else {
-            prepareTipText.textFormatArgs[0] = Mathf.CeilToInt(prepareTime);
-            prepareTipText.ApplyToText();
+            int curTime = Mathf.CeilToInt(prepareTime);
+            if (showedPrepareTime != curTime) {
+                showedPrepareTime = curTime;
+                TextAutoLanguage2 gt = GetGuideTip();
+                gt.textFormatArgs[0] = Mathf.CeilToInt(prepareTime);
+                gt.ApplyToText();
+            }
         }
     }
+
+    TextAutoLanguage2 _guideTip;
+    TextAutoLanguage2 GetGuideTip() {
+        if (_guideTip == null) _guideTip = transform.Find("FrameTip").GetComponentInChildren<TextAutoLanguage2>();
+        return _guideTip;
+    }
 }