lvjincheng 3 سال پیش
والد
کامیت
d19e6f7396

+ 11 - 1
Assets/BowArrow/Modules/NewUserGuider/NewUserGuider.cs

@@ -111,7 +111,17 @@ public class NewUserGuider : MonoBehaviour
         } else {
             frameTip.position = config.frameTipPos;
         }
-        frameTip.GetComponentInChildren<Text>().text = config.frameTipText;
+
+        if (config.frameTipText != null) {
+            frameTip.GetComponentInChildren<Text>().text = config.frameTipText;
+        }
+        else if (config.frameTipTextKey != null) {
+            frameTip.Find("Text").gameObject.AddComponent<TextAutoLanguage2>().SetTextKey(config.frameTipTextKey);
+        }
+        else {
+            frameTip.Find("Text").gameObject.AddComponent<TextAutoLanguage2>().SetTextKey("new-user-guider_tip_" + config.key);
+        }
+        
         frameTip.gameObject.SetActive(true);
 
         GetMaskClickedEvent().AddListener(OnClick_ToNext);

+ 182 - 181
Assets/BowArrow/Modules/NewUserGuider/NewUserGuiderManager.cs

@@ -85,6 +85,7 @@ public class NewUserGuiderManager : MonoBehaviour
         configsInited = true;
 
         NewUserGuiderConfig config = new NewUserGuiderConfig();
+        config.key = "模块开机";
         config.hitPosType = 1;
         config.hitPos = new Vector2(-86.4f, -70.3f); 
         config.pointerRotZ = 120;
@@ -92,109 +93,13 @@ public class NewUserGuiderManager : MonoBehaviour
         config.pointerPos = new Vector2(-155, -31);
         config.frameTipPosType = 1;
         config.frameTipPos = new Vector2(-73.5f, 106);
-        config.frameTipText = "长按模块上的<color=#FFA500>“开机”</color>键,当绿灯闪烁时,即模块处于等待连接的状态。";
         config.onStart = (g) => g.transform.Find("IconModule").gameObject.SetActive(true);
-        configs.Add("模块开机", config);
-
-
-        config = new NewUserGuiderConfig();
-        config.hitActive = false;
-        config.pointerActive = false;
-        config.frameTipPivot = "ct";
-        config.frameTipPosType = 1;
-        config.frameTipPos = Vector2.zero;
-        config.frameTipText = "恭喜您完成了本次新手教程,下次如果还\n要" + 
-            "<color=#FFA500>了解本教程</color>请在<color=#FFA500>游戏教程中选择新手指导</color>。";
-        config.onStart = (g) => {
-            g.GetMaskClickedEvent().AddListener(() => {
-                OnEnd();
-            });
-
-            GameMode gameMode = GameMgr.ins.gameMode;
-            if (gameMode.GetType().Equals(typeof(TimeLimitGameMode))) {
-                gameMode.PauseTimeCounting(g);
-                g.action_OnDestroy += () => gameMode.ResumeTimeCounting(g);
-            }
-        };
-        configs.Add("教程结束", config);
-        
-
-        config = new NewUserGuiderConfig();
-        config.frameTipPivot = "rb";
-        config.frameTipPos = Vector2.zero;
-        config.frameTipText = "点击<color=#FFA500>视角归位按钮,按完按键后立刻以标准射箭姿势瞄准\n靶心</color>," + 
-            "3秒后完成视角的自动归位。";
-        config.onPrepare = (g) => {
-            if (!GameAssistUI.ins) {
-                g.customPreparePass = false;
-                return;
-            }
-            g.customPreparePass = true;
-            g.hollowOutMask.isTargetRectCanThrough = false;
-            RectTransform btn4 = GameAssistUI.ins.transform.Find("Button4") as RectTransform;
-            g.hollowOutMask.SetTarget(btn4);
-            RectTransform btn4_img = btn4.Find("Image") as RectTransform;
-            g.config.hitPos = btn4_img.position;
-            g.config.pointerRotZ = 120;
-            g.config.pointerPos = btn4_img.position + RectTransformUtils.CanvasV3ToScreenV3(new Vector3(-60, 60), btn4);
-            g.config.frameTipPos = btn4_img.position + RectTransformUtils.CanvasV3ToScreenV3(new Vector3(-120, 120), btn4);
-
-            // g.clickedWillPlayAudioBtn = false;
-            // g.GetMaskClickedEvent().AddListener(() => {
-            //     btn4.GetComponent<Button>().onClick.Invoke();
-            // });
-            GameMode gameMode = GameMgr.ins.gameMode;
-            if (gameMode.GetType().Equals(typeof(TimeLimitGameMode))) {
-                gameMode.PauseTimeCounting(g);
-                g.action_OnDestroy += () => gameMode.ResumeTimeCounting(g);
-            }
-        };
-        config.onStart = (g) => {
-            g.GetMaskClickedEvent().RemoveAllListeners();
-            g.GetNewUserGuiderButton().onClick += g.OnClick_ToNext;
-        };
-        configs.Add("视角归位-触发", config);
-
-
-        config = new NewUserGuiderConfig();
-        config.frameTipPivot = "lc";
-        config.frameTipText = "请参考图中小人的姿势,<color=#FFA500>立即瞄准屏幕中\n的靶心</color>,3秒后完成视角的自动归位。";
-        config.onPrepare = (g) => {
-            float rectSideLen = RectTransformUtils.ScreenV3ToCanvasV3(Vector3.right * Screen.height * 100 / 720f, g.GetComponent<RectTransform>()).x;
-            Vector2 rectSize = new Vector2(rectSideLen, rectSideLen);
-            RectTransform iconRect = g.transform.Find("IconRect") as RectTransform;
-            iconRect.sizeDelta = rectSize;
-            iconRect.gameObject.SetActive(true);
-
-            g.hollowOutMask.isTargetRectCanThrough = false;
-            g.hollowOutMask.SetTarget(iconRect);
-
-            g.config.hitPosType = 1;
-            g.config.hitPos = Vector2.zero;
-
-            g.config.pointerPosType = 1;
-            g.config.pointerRotZ = 120;
-            g.config.pointerPos = new Vector2(-rectSideLen / 2 * 1.2f, rectSideLen / 2 * 1.1f);
-
-            RectTransform iconHumanShoot = g.transform.Find("IconHumanShoot") as RectTransform;
-            iconHumanShoot.anchoredPosition = g.config.pointerPos;
-            iconHumanShoot.gameObject.SetActive(true);
-
-            g.config.frameTipPosType = 1;
-            g.config.frameTipPos = new Vector2(rectSideLen / 2 * 1.3f, 0);
-
-            GameMode gameMode = GameMgr.ins.gameMode;
-            if (gameMode.GetType().Equals(typeof(TimeLimitGameMode))) {
-                gameMode.PauseTimeCounting(g);
-                g.action_OnDestroy += () => gameMode.ResumeTimeCounting(g);
-            }
-        };
-        configs.Add("视角归位-瞄准", config);
-
+        configs.Add(config.key, config);
 
         config = new NewUserGuiderConfig();
+        config.key = "连接设备";
         config.frameTipPivot = "lb";
-        config.frameTipText = "点击<color=#FFA500>“连接”</color>等待设备提示连接成功,此时模块处于绿灯常亮的状态。";
+        config.frameTipText = TextAutoLanguage2.GetTextByKey("new-user-guider_tip_" + config.key);
         config.onPrepare = (g) => {
             RectTransform btn = GameObject.Find("HomeView/HomeViewRenderBow/Btn").GetComponent<RectTransform>();
             g.hollowOutMask.SetTarget(btn);
@@ -205,66 +110,86 @@ public class NewUserGuiderManager : MonoBehaviour
             g.config.pointerPos = btn.position + RectTransformUtils.CanvasV3ToScreenV3(Vector3.up * 80f, btn);
             g.config.frameTipPos = btn.position + RectTransformUtils.CanvasV3ToScreenV3(Vector3.up * 150f, btn);
         };
-        configs.Add("连接设备", config);
-
+        configs.Add(config.key, config);
 
         config = new NewUserGuiderConfig();
+        config.key = "弓箭详情";
         config.frameTipPivot = "lt";
-        config.frameTipText = "点击<color=#FFA500>联机游戏</color>进入游戏";
         config.onPrepare = (g) => {
-            RectTransform btn = GameObject.Find("HomeView/RightPanel/Item (1)").GetComponent<RectTransform>();
+            RectTransform btn = GameObject.Find("HomeView/HomeViewRenderBow/BtnShowDetail").GetComponent<RectTransform>();
             g.hollowOutMask.SetTarget(btn);
             g.hollowOutMask.isTargetRectCanThrough = false;
-            g.config.hitPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.5f, 0.6f));
-            g.config.pointerPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.8f, 0.9f));
-            g.config.frameTipPos = RectTransformUtils.GetPositionByPivot(btn, Vector2.zero);
+            g.config.hitPos = RectTransformUtils.GetPositionByPivot(btn, Vector2.one * 0.5f);
+            g.config.pointerPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.8f, 0.7f));
+            g.config.frameTipPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.8f, 0.5f));
+
+            HomeViewRenderBow homeViewRenderBow = FindObjectOfType<HomeViewRenderBow>();
+            if (homeViewRenderBow) {
+                g.clickedWillPlayAudioBtn = false;
+                g.GetMaskClickedEvent().AddListener(homeViewRenderBow.OnClick_ShowDeviceView);
+            }
+            
         };
-        configs.Add("联机游戏", config);
+        configs.Add(config.key, config);
 
 
         config = new NewUserGuiderConfig();
-        config.frameTipPivot = "lt";
-        config.frameTipText = "点击<color=#FFA500>开始游戏</color>,开始对局吧!";
+        config.key = "设备-陀螺仪校准";
+        config.frameTipPivot = "rt";
         config.onPrepare = (g) => {
-            RectTransform btn = GameObject.Find("HomeView/RightPanel/Item").GetComponent<RectTransform>();
+            if (!DeviceView1.ins) {
+                g.customPreparePass = false;
+                return;
+            }
+            g.customPreparePass = true;
+
+            RectTransform btn = DeviceView1.ins.transform.Find("ItemInfo/BowOptions/GyrCalibrate") as RectTransform;
             g.hollowOutMask.SetTarget(btn);
             g.hollowOutMask.isTargetRectCanThrough = false;
-            g.config.hitPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.5f, 0.6f));
-            g.config.pointerPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.8f, 0.9f));
-            g.config.frameTipPos = RectTransformUtils.GetPositionByPivot(btn, Vector2.zero);
-            g.GetMaskClickedEvent().AddListener(() => {
-                GameObject.Instantiate(SceneResMgr.ins.GetPrefab("GameStartView"));
-            });
+            g.SetIconPointerHitOpacity(0.8f);
+            g.config.hitPos = RectTransformUtils.GetPositionByPivot(btn, Vector2.one * 0.5f);
+            g.config.pointerRotZ = 180;
+            g.config.pointerPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(-0.1f, 0.2f));
+            g.config.frameTipPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.3f, 0))
+                + RectTransformUtils.CanvasV3ToScreenV3(Vector3.down * 80f, g.iconPointer);
         };
-        configs.Add("开始游戏", config);
+        configs.Add(config.key, config);
 
 
         config = new NewUserGuiderConfig();
-        config.frameTipPivot = "lt";
-        config.frameTipText = "点击<color=#FFA500>弓箭</color>,查看更多信息。";
+        config.key = "设备-地磁计校准";
+        config.frameTipPivot = "rt";
         config.onPrepare = (g) => {
-            RectTransform btn = GameObject.Find("HomeView/HomeViewRenderBow/BtnShowDetail").GetComponent<RectTransform>();
+            if (!DeviceView1.ins) {
+                g.customPreparePass = false;
+                return;
+            }
+            g.customPreparePass = true;
+
+            RectTransform btn = DeviceView1.ins.transform.Find("ItemInfo/BowOptions/MagCalibrate") as RectTransform;
             g.hollowOutMask.SetTarget(btn);
             g.hollowOutMask.isTargetRectCanThrough = false;
+            g.SetIconPointerHitOpacity(0.8f);
             g.config.hitPos = RectTransformUtils.GetPositionByPivot(btn, Vector2.one * 0.5f);
-            g.config.pointerPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.8f, 0.7f));
-            g.config.frameTipPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.8f, 0.5f));
+            g.config.pointerRotZ = 180;
+            g.config.pointerPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(-0.1f, 0.2f));
+            g.config.frameTipPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.3f, 0))
+                + RectTransformUtils.CanvasV3ToScreenV3(Vector3.down * 60f, g.iconPointer);
 
-            HomeViewRenderBow homeViewRenderBow = FindObjectOfType<HomeViewRenderBow>();
-            if (homeViewRenderBow) {
+            DeviceView1 deviceView1 = FindObjectOfType<DeviceView1>();
+            if (deviceView1) {
                 g.clickedWillPlayAudioBtn = false;
-                g.GetMaskClickedEvent().AddListener(homeViewRenderBow.OnClick_ShowDeviceView);
+                g.GetMaskClickedEvent().AddListener(deviceView1.OnClick_Back);
             }
-            
         };
-        configs.Add("弓箭详情", config);
+        configs.Add(config.key, config);
 
 
         config = new NewUserGuiderConfig();
+        config.key = "查看设置";
         config.frameTipPivot = "rt";
-        config.frameTipText = "点击查看<color=#FFA500>商城</color>";
         config.onPrepare = (g) => {
-            RectTransform btn = GameObject.Find("TopBarView/TopBar/IconShop").GetComponent<RectTransform>();
+            RectTransform btn = GameObject.Find("TopBarView/TopBar/IconSetUp").GetComponent<RectTransform>();
             g.hollowOutMask.SetTarget(btn);
             g.hollowOutMask.isTargetRectCanThrough = false;
             g.SetIconPointerHitOpacity(0.6f);
@@ -274,14 +199,14 @@ public class NewUserGuiderManager : MonoBehaviour
             g.config.frameTipPos = RectTransformUtils.GetPositionByPivot(btn, Vector2.zero) 
                 + RectTransformUtils.CanvasV3ToScreenV3(Vector3.down * 80f, g.iconPointer);
         };
-        configs.Add("查看商城", config);
+        configs.Add(config.key, config);
 
 
         config = new NewUserGuiderConfig();
+        config.key = "查看商城";
         config.frameTipPivot = "rt";
-        config.frameTipText = "点击<color=#FFA500>设置</color>了解更多";
         config.onPrepare = (g) => {
-            RectTransform btn = GameObject.Find("TopBarView/TopBar/IconSetUp").GetComponent<RectTransform>();
+            RectTransform btn = GameObject.Find("TopBarView/TopBar/IconShop").GetComponent<RectTransform>();
             g.hollowOutMask.SetTarget(btn);
             g.hollowOutMask.isTargetRectCanThrough = false;
             g.SetIconPointerHitOpacity(0.6f);
@@ -291,12 +216,12 @@ public class NewUserGuiderManager : MonoBehaviour
             g.config.frameTipPos = RectTransformUtils.GetPositionByPivot(btn, Vector2.zero) 
                 + RectTransformUtils.CanvasV3ToScreenV3(Vector3.down * 80f, g.iconPointer);
         };
-        configs.Add("查看设置", config);
+        configs.Add(config.key, config);
 
 
         config = new NewUserGuiderConfig();
+        config.key = "切换好友/排行榜";
         config.frameTipPivot = "lt";
-        config.frameTipText = "点击切换<color=#FFA500>好友/排行榜</color>";
         config.onPrepare = (g) => {
             RectTransform btn = GameObject.Find("HomeView/FriendBar/FrameBtnTop").GetComponent<RectTransform>();
             g.hollowOutMask.SetTarget(btn);
@@ -307,12 +232,12 @@ public class NewUserGuiderManager : MonoBehaviour
             g.config.pointerPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(1.2f, 0.9f));
             g.config.frameTipPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(1.2f, 0));
         };
-        configs.Add("切换好友/排行榜", config);
+        configs.Add(config.key, config);
 
 
         config = new NewUserGuiderConfig();
+        config.key = "展开好友/排行榜";
         config.frameTipPivot = "lc";
-        config.frameTipText = "展开查看<color=#FFA500>更多详情</color>";
         config.onPrepare = (g) => {
             RectTransform btn = GameObject.Find("HomeView/FriendBar/FrameBtnBottom").GetComponent<RectTransform>();
             g.hollowOutMask.SetTarget(btn);
@@ -323,61 +248,43 @@ public class NewUserGuiderManager : MonoBehaviour
             g.config.pointerPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(1, 0.9f));
             g.config.frameTipPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(1.5f, 0.5f));
         };
-        configs.Add("展开好友/排行榜", config);
+        configs.Add(config.key, config);
+
 
         config = new NewUserGuiderConfig();
-        config.frameTipPivot = "rt";
-        config.frameTipText = "将安装了模块的智能弓箭<color=#FFA500>静置在一个平面</color>";
+        config.key = "联机游戏";
+        config.frameTipPivot = "lt";
         config.onPrepare = (g) => {
-            if (!DeviceView1.ins) {
-                g.customPreparePass = false;
-                return;
-            }
-            g.customPreparePass = true;
-
-            RectTransform btn = DeviceView1.ins.transform.Find("ItemInfo/BowOptions/GyrCalibrate") as RectTransform;
+            RectTransform btn = GameObject.Find("HomeView/RightPanel/Item (1)").GetComponent<RectTransform>();
             g.hollowOutMask.SetTarget(btn);
             g.hollowOutMask.isTargetRectCanThrough = false;
-            g.SetIconPointerHitOpacity(0.8f);
-            g.config.hitPos = RectTransformUtils.GetPositionByPivot(btn, Vector2.one * 0.5f);
-            g.config.pointerRotZ = 180;
-            g.config.pointerPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(-0.1f, 0.2f));
-            g.config.frameTipPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.3f, 0))
-                + RectTransformUtils.CanvasV3ToScreenV3(Vector3.down * 80f, g.iconPointer);
+            g.config.hitPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.5f, 0.6f));
+            g.config.pointerPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.8f, 0.9f));
+            g.config.frameTipPos = RectTransformUtils.GetPositionByPivot(btn, Vector2.zero);
         };
-        configs.Add("设备-陀螺仪校准", config);
+        configs.Add(config.key, config);
+
 
         config = new NewUserGuiderConfig();
-        config.frameTipPivot = "rt";
-        config.frameTipText = "将安装了模块的智能弓箭<color=#FFA500>沿着每一个轴旋转</color>";
+        config.key = "开始游戏";
+        config.frameTipPivot = "lt";
         config.onPrepare = (g) => {
-            if (!DeviceView1.ins) {
-                g.customPreparePass = false;
-                return;
-            }
-            g.customPreparePass = true;
-
-            RectTransform btn = DeviceView1.ins.transform.Find("ItemInfo/BowOptions/MagCalibrate") as RectTransform;
+            RectTransform btn = GameObject.Find("HomeView/RightPanel/Item").GetComponent<RectTransform>();
             g.hollowOutMask.SetTarget(btn);
             g.hollowOutMask.isTargetRectCanThrough = false;
-            g.SetIconPointerHitOpacity(0.8f);
-            g.config.hitPos = RectTransformUtils.GetPositionByPivot(btn, Vector2.one * 0.5f);
-            g.config.pointerRotZ = 180;
-            g.config.pointerPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(-0.1f, 0.2f));
-            g.config.frameTipPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.3f, 0))
-                + RectTransformUtils.CanvasV3ToScreenV3(Vector3.down * 60f, g.iconPointer);
-
-            DeviceView1 deviceView1 = FindObjectOfType<DeviceView1>();
-            if (deviceView1) {
-                g.clickedWillPlayAudioBtn = false;
-                g.GetMaskClickedEvent().AddListener(deviceView1.OnClick_Back);
-            }
+            g.config.hitPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.5f, 0.6f));
+            g.config.pointerPos = RectTransformUtils.GetPositionByPivot(btn, new Vector2(0.8f, 0.9f));
+            g.config.frameTipPos = RectTransformUtils.GetPositionByPivot(btn, Vector2.zero);
+            g.GetMaskClickedEvent().AddListener(() => {
+                GameObject.Instantiate(SceneResMgr.ins.GetPrefab("GameStartView"));
+            });
         };
-        configs.Add("设备-地磁计校准", config);
+        configs.Add(config.key, config);
+
 
         config = new NewUserGuiderConfig();
+        config.key = "开始-限时游戏";
         config.frameTipPivot = "lt";
-        config.frameTipText = "点击<color=#FFA500>“限时游戏”</color>选择游戏类型";
         config.onPrepare = (g) => {
             if (!GameStartView.ins) {
                 g.customPreparePass = false;
@@ -404,11 +311,12 @@ public class NewUserGuiderManager : MonoBehaviour
                 });
             }
         };
-        configs.Add("开始-限时游戏", config);
+        configs.Add(config.key, config);
+
 
         config = new NewUserGuiderConfig();
+        config.key = "限时游戏-选择距离";
         config.frameTipPivot = "lc";
-        config.frameTipText = "选择距离<color=#FFA500>“10米”</color>开始游戏吧!";
         config.onPrepare = (g) => {
             if (g.hollowOutMask.enabled) g.hollowOutMask.enabled = false;
             if (!TimeLimitGameDistanceSelectView.ins) {
@@ -431,7 +339,100 @@ public class NewUserGuiderManager : MonoBehaviour
                 btn.GetComponent<Button>().onClick.Invoke();
             });
         };
-        configs.Add("限时游戏-选择距离", config);
+        configs.Add(config.key, config);
+
+
+        config = new NewUserGuiderConfig();
+        config.key = "视角归位-触发";
+        config.frameTipPivot = "rb";
+        config.frameTipPos = Vector2.zero;
+        config.onPrepare = (g) => {
+            if (!GameAssistUI.ins) {
+                g.customPreparePass = false;
+                return;
+            }
+            g.customPreparePass = true;
+            g.hollowOutMask.isTargetRectCanThrough = false;
+            RectTransform btn4 = GameAssistUI.ins.transform.Find("Button4") as RectTransform;
+            g.hollowOutMask.SetTarget(btn4);
+            RectTransform btn4_img = btn4.Find("Image") as RectTransform;
+            g.config.hitPos = btn4_img.position;
+            g.config.pointerRotZ = 120;
+            g.config.pointerPos = btn4_img.position + RectTransformUtils.CanvasV3ToScreenV3(new Vector3(-60, 60), btn4);
+            g.config.frameTipPos = btn4_img.position + RectTransformUtils.CanvasV3ToScreenV3(new Vector3(-120, 120), btn4);
+
+            // g.clickedWillPlayAudioBtn = false;
+            // g.GetMaskClickedEvent().AddListener(() => {
+            //     btn4.GetComponent<Button>().onClick.Invoke();
+            // });
+            GameMode gameMode = GameMgr.ins.gameMode;
+            if (gameMode.GetType().Equals(typeof(TimeLimitGameMode))) {
+                gameMode.PauseTimeCounting(g);
+                g.action_OnDestroy += () => gameMode.ResumeTimeCounting(g);
+            }
+        };
+        config.onStart = (g) => {
+            g.GetMaskClickedEvent().RemoveAllListeners();
+            g.GetNewUserGuiderButton().onClick += g.OnClick_ToNext;
+        };
+        configs.Add(config.key, config);
+
+
+        config = new NewUserGuiderConfig();
+        config.key = "视角归位-瞄准";
+        config.frameTipPivot = "lc";
+        config.onPrepare = (g) => {
+            float rectSideLen = RectTransformUtils.ScreenV3ToCanvasV3(Vector3.right * Screen.height * 100 / 720f, g.GetComponent<RectTransform>()).x;
+            Vector2 rectSize = new Vector2(rectSideLen, rectSideLen);
+            RectTransform iconRect = g.transform.Find("IconRect") as RectTransform;
+            iconRect.sizeDelta = rectSize;
+            iconRect.gameObject.SetActive(true);
+
+            g.hollowOutMask.isTargetRectCanThrough = false;
+            g.hollowOutMask.SetTarget(iconRect);
+
+            g.config.hitPosType = 1;
+            g.config.hitPos = Vector2.zero;
+
+            g.config.pointerPosType = 1;
+            g.config.pointerRotZ = 120;
+            g.config.pointerPos = new Vector2(-rectSideLen / 2 * 1.2f, rectSideLen / 2 * 1.1f);
+
+            RectTransform iconHumanShoot = g.transform.Find("IconHumanShoot") as RectTransform;
+            iconHumanShoot.anchoredPosition = g.config.pointerPos;
+            iconHumanShoot.gameObject.SetActive(true);
+
+            g.config.frameTipPosType = 1;
+            g.config.frameTipPos = new Vector2(rectSideLen / 2 * 1.3f, 0);
+
+            GameMode gameMode = GameMgr.ins.gameMode;
+            if (gameMode.GetType().Equals(typeof(TimeLimitGameMode))) {
+                gameMode.PauseTimeCounting(g);
+                g.action_OnDestroy += () => gameMode.ResumeTimeCounting(g);
+            }
+        };
+        configs.Add(config.key, config);
+
+
+        config = new NewUserGuiderConfig();
+        config.key = "教程结束";
+        config.hitActive = false;
+        config.pointerActive = false;
+        config.frameTipPivot = "ct";
+        config.frameTipPosType = 1;
+        config.frameTipPos = Vector2.zero;
+        config.onStart = (g) => {
+            g.GetMaskClickedEvent().AddListener(() => {
+                OnEnd();
+            });
+
+            GameMode gameMode = GameMgr.ins.gameMode;
+            if (gameMode.GetType().Equals(typeof(TimeLimitGameMode))) {
+                gameMode.PauseTimeCounting(g);
+                g.action_OnDestroy += () => gameMode.ResumeTimeCounting(g);
+            }
+        };
+        configs.Add(config.key, config);
     }
 
     #if UNITY_EDITOR
@@ -480,7 +481,6 @@ public class NewUserGuiderManager : MonoBehaviour
     void ExecuteCurConfig() {
         InitConfigs();
         NewUserGuiderConfig config = configs[curConfigKey];
-        config.key = curConfigKey;
         NewUserGuider guider = Instantiate(prefab_NewUserGuider).GetComponent<NewUserGuider>();
         guider.config = config;
     }
@@ -509,7 +509,8 @@ public class NewUserGuiderConfig
     public int frameTipPosType = 0;
     public Vector2 frameTipPos;
     //frameTip text
-    public string frameTipText;
+    public string frameTipText = null;
+    public string frameTipTextKey = null;
     public Action<NewUserGuider> onPrepare;
     public Action<NewUserGuider> onStart;
 }

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

@@ -27,6 +27,24 @@
     "course_title_10": "撒放",
     "course_title_11": "结束动作",
     "course_btn_see": "查看",
+
+    "new-user-guider_tip_模块开机": "长按模块上的<color=#FFA500>“开机”</color>键,当绿灯闪\n烁时,即模块处于等待连接的状态。",
+    "new-user-guider_tip_连接设备": "点击<color=#FFA500>“连接”</color>等待设备提示连接成功,\n此时模块处于绿灯常亮的状态。",
+    "new-user-guider_tip_弓箭详情": "点击<color=#FFA500>弓箭</color>,查看更多信息。",
+    "new-user-guider_tip_设备-陀螺仪校准": "将安装了模块的智能弓箭<color=#FFA500>静置在一个平面</color>",
+    "new-user-guider_tip_设备-地磁计校准": "将安装了模块的智能弓箭<color=#FFA500>沿着每一个轴旋转</color>",
+    "new-user-guider_tip_查看设置": "点击<color=#FFA500>设置</color>了解更多",
+    "new-user-guider_tip_查看商城": "点击查看<color=#FFA500>商城</color>",
+    "new-user-guider_tip_切换好友/排行榜": "点击切换<color=#FFA500>好友/排行榜</color>",
+    "new-user-guider_tip_展开好友/排行榜": "展开查看<color=#FFA500>更多详情</color>",
+    "new-user-guider_tip_联机游戏": "点击<color=#FFA500>联机游戏</color>进入游戏",
+    "new-user-guider_tip_开始游戏": "点击<color=#FFA500>开始游戏</color>,开始对局吧!",
+    "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>立即瞄准屏幕中\n的靶心</color>,3秒后完成视角的自动归位。",
+    "new-user-guider_tip_教程结束": "恭喜您完成了本次新手教程,下次如果还\n要<color=#FFA500>了解本教程</color>请在<color=#FFA500>游戏教程中选择新手指导</color>。",
+    
     "setup_fix-game-bg": "固定游戏背景",
     "setup_train-mode": "训练模式",
     "setup_screen-size": "屏幕尺寸 {0} 英寸",

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

@@ -27,6 +27,24 @@
     "course_title_10": "Release",
     "course_title_11": "Finish up job",
     "course_btn_see": "see",
+    
+    "new-user-guider_tip_模块开机": "Press and hold the <color=#FFA500>\"Power on\"</color> key \non the module, and when the green \nlight flashes, the module is in the \nstate of waiting for connection.",
+    "new-user-guider_tip_连接设备": "Click <color=#FFA500>\"Connect\"</color> and wait for the device to \nprompt that the connection is successful. \nAt this time, the module is in the green state.",
+    "new-user-guider_tip_弓箭详情": "Click the <color=#FFA500>arrow</color> to see more information.",
+    "new-user-guider_tip_设备-陀螺仪校准": "Place the smart bow with the module <color=#FFA500>installed on a plane</color>",
+    "new-user-guider_tip_设备-地磁计校准": "Rotate the smart bow with modules <color=#FFA500>installed along each axis</color>",
+    "new-user-guider_tip_查看设置": "Click <color=#FFA500>SetUp</color> to learn more",
+    "new-user-guider_tip_查看商城": "Click to view the <color=#FFA500>Shop</color>",
+    "new-user-guider_tip_切换好友/排行榜": "Click to switch <color=#FFA500>friend/rand</color>",
+    "new-user-guider_tip_展开好友/排行榜": "Expand to see <color=#FFA500>more details</color>",
+    "new-user-guider_tip_联机游戏": "Click <color=#FFA500>Online</color> to enter the game",
+    "new-user-guider_tip_开始游戏": "Click to <color=#FFA500>Start</color> and start the game!",
+    "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_教程结束": "Congratulations on completing this novice tutorial. If you want to <color=#FFA500>know this \ntutorial</color> next time, please <color=#FFA500>select the novice guidance in the game course.</color>",
+
     "setup_fix-game-bg": "FixGameBG",
     "setup_train-mode": "TrainMode",
     "setup_screen-size": "Screen Size {0} Inch",