浏览代码

1.修改屏幕的左右中心点,基于canvas的Transform AutoResetViewNew.cs
2.添加调试按钮显示控制
3.GameDouble 场景显示校准用 InfraredD 这个视角归位
4.首页验证码部分文字提示 RegisterView.cs
5.bInfraredDevices 添加两个设备判断

slambb 1 月之前
父节点
当前提交
5b4da36fc8

二进制
Assets/AddressableAssetsData/Android/addressables_content_state.bin


+ 2 - 2
Assets/BowArrow/DoubleScene/Resources/AutoResetViewNew.prefab

@@ -205,7 +205,7 @@ RectTransform:
   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: 330, y: 0}
+  m_AnchoredPosition: {x: 386, y: 0}
   m_SizeDelta: {x: 100, y: 100}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!1 &5733520577226223840
@@ -420,7 +420,7 @@ RectTransform:
   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: -330, y: 0}
+  m_AnchoredPosition: {x: -386, y: 0}
   m_SizeDelta: {x: 100, y: 100}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!1 &8541278423340140556

+ 28 - 4
Assets/BowArrow/DoubleScene/Scripts/AutoResetViewNew.cs

@@ -39,14 +39,38 @@ public class AutoResetViewNew : MonoBehaviour
         GetGuideTip().SetTextKey(value);
     }
 
-    public void setPosLeft() {
-        //Debug.Log(Screen.width + " == "+ Screen.height);
-        (pos as RectTransform).anchoredPosition = leftPoint.GetComponent<RectTransform>().anchoredPosition;
+    //public void setPosLeft() {
+    //    //Debug.Log(Screen.width + " == "+ Screen.height);
+    //    (pos as RectTransform).anchoredPosition = leftPoint.GetComponent<RectTransform>().anchoredPosition;
+    //}
+
+    //public void setPosRight()
+    //{
+    //    (pos as RectTransform).anchoredPosition = rightPoint.GetComponent<RectTransform>().anchoredPosition;
+    //}
+
+    public void setPosLeft()
+    {
+        RectTransform rt = pos as RectTransform;
+        RectTransform parent = rt.parent as RectTransform;
+
+        float halfWidth = parent.rect.width / 4f; // 1280/4 = 320
+        rt.anchorMin = new Vector2(0, 0.5f);
+        rt.anchorMax = new Vector2(0, 0.5f);
+        rt.pivot = new Vector2(0.5f, 0.5f);
+        rt.anchoredPosition = new Vector2(halfWidth, 0);
     }
 
     public void setPosRight()
     {
-        (pos as RectTransform).anchoredPosition = rightPoint.GetComponent<RectTransform>().anchoredPosition;
+        RectTransform rt = pos as RectTransform;
+        RectTransform parent = rt.parent as RectTransform;
+
+        float halfWidth = parent.rect.width / 4f; // 1280/4 = 320
+        rt.anchorMin = new Vector2(1, 0.5f);
+        rt.anchorMax = new Vector2(1, 0.5f);
+        rt.pivot = new Vector2(0.5f, 0.5f);
+        rt.anchoredPosition = new Vector2(-halfWidth, 0);
     }
 
     public Action action_OnDestroy;

+ 2 - 1
Assets/BowArrow/InfraredCamera/InfraredDemo.cs

@@ -75,7 +75,8 @@ public class InfraredDemo : JCUnityLib.ViewBase
         InitDebugScreenPoint();
         // gameObject.AddComponent<FPSTester>();
 
-        if (CommonConfig.StandaloneModeOrPlatformB)
+        //有需要可以隐藏
+        if (CommonConfig.StandaloneModeOrPlatformB || CommonConfig.bHideInfraredDemoBtnSee)
         {
             mBtnSee.gameObject.SetActive(false);
         }

+ 1 - 0
Assets/BowArrow/Scripts/Bluetooth/BluetoothAim.cs

@@ -1017,6 +1017,7 @@ public class BluetoothAim : MonoBehaviour
                 GameObject resetView = Instantiate(Resources.Load<GameObject>("AutoResetViewNew"));
                 resetView.name = "AutoResetViewNewRight";
                 AutoResetViewNew autoResetViewNewScript = resetView.GetComponent<AutoResetViewNew>();
+                autoResetViewNewScript.setTextKey("new-user-guider_tip_视角归位-瞄准-infraredD");
                 autoResetViewNewScript.setPosRight();
                 autoResetViewNewScript.action_OnDestroy += () =>
                 {

+ 5 - 0
Assets/BowArrow/Scripts/CommonConfig.cs

@@ -138,6 +138,11 @@ public class CommonConfig
     /// </summary>
     public static bool bInfraredApp { get; } = false;
 
+    /// <summary>
+    /// 隐藏调试按钮
+    /// </summary>
+    public static bool bHideInfraredDemoBtnSee { get; } = true;
+
     //打包App 的端,比如打包B 端就设置 B
     public static OperatingPlatform OP { get; } = OperatingPlatform.C;
 

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

@@ -293,8 +293,10 @@
 
   "RelateValidateView-email00": "绑定邮箱",
   "RelateValidateView-email0": "邮箱验证",
+  "RelateValidateView-email001": "验证码",
   "RelateValidateView-email1": "请输入邮箱账号",
   "RelateValidateView-email2": "请输入验证码",
+  "RelateValidateView-email201": "请输入6位验证码",
   "RelateValidateView-email22": "请输入验证码",
   "RelateValidateView-email3": "发送验证码",
   "RelateValidateView-email4": "提交",

+ 4 - 2
Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/en.json

@@ -153,7 +153,7 @@
   //"new-user-guider_tip_视角归位-瞄准-infrared": "Refer to the posture shown in the image, use the top part \nof arrow quiver as a reference point, and immediately\naim at the target center. The reticle calibration\nwill complete after <size=40><color=#FFA500>{0}</color></size> seconds",
   "new-user-guider_tip_视角归位-瞄准-infrared": "Refer to the diagram: Immediately aim at the bullseye using the arrow\nnock head as reference point. Calibration completes in <size=40><color=#FFA500>{0}</color></size> seconds.",
   //"new-user-guider_tip_视角归位-瞄准-infraredD": "Refer to the posture shown in the image, \nuse the top part of arrow quiver as a \nreference point, and immediately\naim at the target center. The reticle \ncalibration will complete after <size=40><color=#FFA500>{0}</color></size> seconds",
-  "new-user-guider_tip_视角归位-瞄准-infraredD": "Refer to the diagram: Immediately aim \nat the bullseye using the arrow nock \nhead as reference point. \nCalibration completes in <size=40><color=#FFA500>{0}</color></size> seconds.",
+  "new-user-guider_tip_视角归位-瞄准-infraredD": "Refer to the diagram: Immediately aim \nat the bullseye using the arrow nock \nhead as reference point. Calibration \ncompletes in <size=40><color=#FFA500>{0}</color></size> seconds.",
   //"new-user-guider_tip_视角归位-瞄准-infrared-gun": "Quickly reload the magazine and adopt the three-point shooting stance\n to aim at the target center. The reticle calibration will \ncomplete after <size=40><color=#FFA500>{0}</color></size> seconds.",
   "new-user-guider_tip_视角归位-瞄准-infrared-gun": "Reinsert magazine to aim at bullseye.\nHold firing stance for <size=40><color=#FFA500>{0}</color></size>s and crosshair auto-aligns.",
 
@@ -293,8 +293,10 @@
 
   "RelateValidateView-email00": "Bind email",
   "RelateValidateView-email0": "Email verification",
+  "RelateValidateView-email001": "Verification Code",
   "RelateValidateView-email1": "Please enter your email \naccount",
   "RelateValidateView-email2": "Please enter the verification code",
+  "RelateValidateView-email201": "6-digit code",
   "RelateValidateView-email22": "Please enter the verification code",
   "RelateValidateView-email3": "Send verification code",
   "RelateValidateView-email4": "Submit",
@@ -411,7 +413,7 @@
 
   "======WildAttack======": "注释",
   "LevelWildAttack": "Wild Attack",
-  "BatteryLevel": "Batt.",
+  "BatteryLevel": "Bat",
 
   "======OlynpicArchery======": "注释",
   "OlynpicArchery": "Classic Archery",

+ 2 - 0
Assets/BowArrow/Scripts/Expand/AutoResetView.cs

@@ -25,6 +25,8 @@ public class AutoResetView : MonoBehaviour
             GameObject resetView = Instantiate(Resources.Load<GameObject>("AutoResetViewNew"));
             resetView.name = "AutoResetViewNewLeft";
             AutoResetViewNew autoResetViewNewScript = resetView.GetComponent<AutoResetViewNew>();
+            //九轴双人也用新的这个
+            autoResetViewNewScript.setTextKey("new-user-guider_tip_视角归位-瞄准-infraredD");
             autoResetViewNewScript.setPosLeft();
             autoResetViewNewScript.action_OnDestroy += () =>
             {

+ 2 - 2
Assets/BowArrow/Scripts/Manager/LoginMgr/RegisterView.cs

@@ -211,11 +211,11 @@ public class RegisterView : MonoBehaviour
             registerInUser.transform.Find("Text").GetComponent<Text>().text = TextAutoLanguage2.GetTextByKey("register_email2");
             _inputRelateAccount.transform.Find("Placeholder").GetComponent<Text>().text = TextAutoLanguage2.GetTextByKey("RelateValidateView-email1");
             //输入框文案
-            registerInPhone.transform.Find("Text").GetComponent<Text>().text = TextAutoLanguage2.GetTextByKey("RelateValidateView-email0");
+            registerInPhone.transform.Find("Text").GetComponent<Text>().text = TextAutoLanguage2.GetTextByKey("RelateValidateView-email001");
             //输入框提示
             Text _tempCodeText = _inputValidateCode.transform.Find("Placeholder").GetComponent<Text>();
             //_tempCodeText.fontSize = languageEnum == LanguageEnum.Chinese ? 24 : 20;
-            _tempCodeText.text = TextAutoLanguage2.GetTextByKey("RelateValidateView-email2"); //RelateValidateView-email2
+            _tempCodeText.text = TextAutoLanguage2.GetTextByKey("RelateValidateView-email201"); //RelateValidateView-email2
             //发送按钮
             registerInPhone.transform.Find("GameObject/Send/Text").GetComponent<Text>().text = TextAutoLanguage2.GetTextByKey("common_send"); //RelateValidateView-email3
         }

+ 2 - 0
Assets/BowArrow/Scripts/View/Home/DeviceView_ItemShow.cs

@@ -568,6 +568,8 @@ public class DeviceView_ItemShow : MonoBehaviour
             case AimDeviceType.HOUYIPRO:
             case AimDeviceType.Gun:
             case AimDeviceType.ARTEMISPRO:
+            case AimDeviceType.PistolM17:
+            case AimDeviceType.RifleM416:
                 bInfrared = true;
                 break;