Forráskód Böngészése

1.修改手机匹配蓝牙ARTEMIS Pro
2.修改手机验证码文案,修改校准提示文案和按钮颜色

slambb 1 hete
szülő
commit
f57897e81e

BIN
Assets/AddressableAssetsData/Android/addressables_content_state.bin


+ 0 - 26
Assets/AddressableAssetsData/link.xml

@@ -1,26 +0,0 @@
-<linker>
-  <assembly fullname="Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
-    <type fullname="UnityEngine.AddressableAssets.Addressables" preserve="all" />
-  </assembly>
-  <assembly fullname="Unity.Localization, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
-    <type fullname="UnityEngine.Localization.Locale" preserve="all" />
-    <type fullname="UnityEngine.Localization.Tables.SharedTableData" preserve="all" />
-    <type fullname="UnityEngine.Localization.Tables.StringTable" preserve="all" />
-    <type fullname="UnityEngine.Localization.LocaleIdentifier" preserve="nothing" serialized="true" />
-    <type fullname="UnityEngine.Localization.Metadata.MetadataCollection" preserve="nothing" serialized="true" />
-    <type fullname="UnityEngine.Localization.Tables.DistributedUIDGenerator" preserve="nothing" serialized="true" />
-    <type fullname="UnityEngine.Localization.Tables.SharedTableData/SharedTableEntry" preserve="nothing" serialized="true" />
-    <type fullname="UnityEngine.Localization.Metadata.SmartFormatTag" preserve="nothing" serialized="true" />
-    <type fullname="UnityEngine.Localization.Tables.TableEntryData" preserve="nothing" serialized="true" />
-  </assembly>
-  <assembly fullname="Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
-    <type fullname="UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider" preserve="all" />
-    <type fullname="UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider" preserve="all" />
-    <type fullname="UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider" preserve="all" />
-    <type fullname="UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider" preserve="all" />
-    <type fullname="UnityEngine.ResourceManagement.ResourceProviders.SceneProvider" preserve="all" />
-  </assembly>
-  <assembly fullname="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
-    <type fullname="UnityEngine.Object" preserve="all" />
-  </assembly>
-</linker>

+ 0 - 7
Assets/AddressableAssetsData/link.xml.meta

@@ -1,7 +0,0 @@
-fileFormatVersion: 2
-guid: c879a36998d15ae42a5b5d5c230ac287
-TextScriptImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

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

@@ -21,6 +21,7 @@ public class BluetoothAim : MonoBehaviour
     #region 弓箭蓝牙模块基本信息
     readonly string targetDeviceNameAxis = "Bbow_20210501 | ARTEMIS | HOUYI | HOUYI Pro | ARTEMIS Pro";
     readonly string targetDeviceName = "Bbow_20210501 | ARTEMIS Pro";//HOUYI Pro
+    readonly string targetDeviceNameARTEMISPro = "ARTEMIS Pro";
     readonly string targetDeviceNameHOUYIPro = "HOUYI Pro";
     readonly string targetDeviceNameGun = "Pistol | Pistol M9 | Bbow_20210501";
     readonly string targetDeviceNameGun_M17 =  "Pistol M17";
@@ -421,7 +422,7 @@ public class BluetoothAim : MonoBehaviour
                     }
                     else if (AimHandler.ins.aimDeviceInfo.type == (int)AimDeviceType.ARTEMISPRO)
                     {   //需要判断是否是ARTEMISPro弓箭
-                        if (TryConnectDevice(targetDeviceName, device.DeviceName, "ARTEMISPRO")) return;
+                        if (TryConnectDevice(targetDeviceNameARTEMISPro, device.DeviceName, "ARTEMISPRO")) return;
                     }
                     else if (AimHandler.ins.aimDeviceInfo.type == (int)AimDeviceType.Gun)
                     {

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

@@ -613,7 +613,8 @@
   "ReManualSetup": "重新手动设置",
   "ReManualSetup1": "重新进行手动定位",
   "AutoPositioningTip": "系统正在自动定位中,请稍等片刻...",
-  "CalibrationFailed": "AI 校准失败\n请尝试手动校准",
+  "CalibrationFailed": "AI 定位失败\n请尝试手动定位",
+  "Successful_CalibrationFailed": "AI 定位失败\n请选择手动定位",
 
   "EnterMarker": "进入屏幕标记",
   "Marker": "屏幕标记",

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

@@ -663,6 +663,7 @@
   "ReManualSetup1": "Redo Manual\nCalibration",
   "AutoPositioningTip": "Calibrating...Please Wait.",
   "CalibrationFailed": "AI Calibration failed\nPlease try Manual Calibration",
+  "Successful_CalibrationFailed": "AI Calibration failed\nPlease choose Manual Calibration",
 
   "EnterMarker": "Start Screen Marking",
   "Marker": "Screen Marking",

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

@@ -225,10 +225,11 @@ public class RegisterView : MonoBehaviour
             _inputRelateAccount.characterLimit = 11;
             registerInUser.transform.Find("Text").GetComponent<Text>().text = TextAutoLanguage2.GetTextByKey("register_phone2");
             _inputRelateAccount.transform.Find("Placeholder").GetComponent<Text>().text = TextAutoLanguage2.GetTextByKey("RelateValidateView-phone1");
-            registerInPhone.transform.Find("Text").GetComponent<Text>().text = TextAutoLanguage2.GetTextByKey("RelateValidateView-phone0");
+            //手机部分的验证码也保持和邮件的文案一样
+            registerInPhone.transform.Find("Text").GetComponent<Text>().text = TextAutoLanguage2.GetTextByKey("RelateValidateView-email001");//("RelateValidateView-phone0");
             Text _tempCodeText = _inputValidateCode.transform.Find("Placeholder").GetComponent<Text>();
             //_tempCodeText.fontSize = languageEnum == LanguageEnum.Chinese ? 24 : 20;
-            _tempCodeText.text = TextAutoLanguage2.GetTextByKey("RelateValidateView-phone2"); //RelateValidateView-phone2
+            _tempCodeText.text = TextAutoLanguage2.GetTextByKey("RelateValidateView-email201");//("RelateValidateView-phone2");
             registerInPhone.transform.Find("GameObject/Send/Text").GetComponent<Text>().text = TextAutoLanguage2.GetTextByKey("common_send");//RelateValidateView-phone3
         }
     }

+ 103 - 0
Assets/SmartBow/Resources/SmartBow/Prefabs/Views/Home/InfraredScreenPositioningView.prefab

@@ -3506,6 +3506,9 @@ MonoBehaviour:
   BottomConfirmBtn: {fileID: 3702552092599838165}
   LayoutAutoEnd: {fileID: 264195977536334739}
   AutoEndConfirmBtn: {fileID: 7414640327676729118}
+  ConfirmBtnBg: {fileID: 21300000, guid: 1dd6462210188304eab44038e4211872, type: 3}
+  ConfirmBtnNormalColor: {r: 1, g: 1, b: 1, a: 1}
+  ConfirmBtnHideColor: {r: 0.70980394, g: 0.70980394, b: 0.70980394, a: 1}
   TipAutoEnd: {fileID: 1325068315848368893}
   TipAutoEndHas: {fileID: 2845380691329673789}
   TipCalibrationFailedIphone: {fileID: 2735675795741493569}
@@ -3548,6 +3551,7 @@ MonoBehaviour:
   CameraSecondImage: {fileID: 6024847586107445466}
   FirstUILineGenerator: {fileID: 4740656544614682486}
   SecondUILineGenerator: {fileID: 4521493893312411290}
+  AutoCalibrationFailedTip: {fileID: 4346460814842630475}
 --- !u!1 &1063890231645679799
 GameObject:
   m_ObjectHideFlags: 0
@@ -11409,6 +11413,7 @@ RectTransform:
   m_Children:
   - {fileID: 6244746342556236460}
   - {fileID: 3749949055301701380}
+  - {fileID: 2504131645816262960}
   m_Father: {fileID: 3572671674518763598}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -13070,6 +13075,104 @@ MonoBehaviour:
   - language: 1
     fontSize: 50
     lineSpacing: 0
+--- !u!1 &4346460814842630475
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 2504131645816262960}
+  - component: {fileID: 5911492656796817283}
+  - component: {fileID: 2154661970533879800}
+  - component: {fileID: 7258534346417299456}
+  m_Layer: 5
+  m_Name: FailTip
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!224 &2504131645816262960
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4346460814842630475}
+  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: []
+  m_Father: {fileID: 645867735737789856}
+  m_RootOrder: 2
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  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_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &5911492656796817283
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4346460814842630475}
+  m_CullTransparentMesh: 1
+--- !u!114 &2154661970533879800
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4346460814842630475}
+  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: 0
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 0
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_FontData:
+    m_Font: {fileID: 12800000, guid: 6b6cc7ab59ef00947950b61fdca2d042, type: 3}
+    m_FontSize: 48
+    m_FontStyle: 1
+    m_BestFit: 0
+    m_MinSize: 2
+    m_MaxSize: 90
+    m_Alignment: 4
+    m_AlignByGeometry: 0
+    m_RichText: 1
+    m_HorizontalOverflow: 0
+    m_VerticalOverflow: 0
+    m_LineSpacing: 1
+  m_Text: 'AI Calibration failed
+
+    Please try Manual Calibration'
+--- !u!114 &7258534346417299456
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4346460814842630475}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 0f4efe98aab6c6b41a7ee1f4c49df27b, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  textKey: Successful_CalibrationFailed
+  layoutRebuildObject: {fileID: 0}
+  languageFontSizes: []
 --- !u!1 &4348070296841637015
 GameObject:
   m_ObjectHideFlags: 0

+ 63 - 12
Assets/SmartBow/Scripts/Views/InfraredViewParts/InfraredScreenPositioningView.cs

@@ -115,6 +115,9 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
     [SerializeField]
     GameObject LayoutAutoEnd;
     [SerializeField] Button AutoEndConfirmBtn;
+    [SerializeField] Sprite ConfirmBtnBg;
+    [SerializeField] Color ConfirmBtnNormalColor = Color.white;
+    [SerializeField] Color ConfirmBtnHideColor = new Color(181f / 255f, 181f / 255f, 181f / 255f, 1f);
     [Tooltip("没有存在校准数据时候显示")]
     [SerializeField]
     GameObject TipAutoEnd;
@@ -189,6 +192,11 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
     RawImage CameraSecondImage; //第二个结果屏幕
     [SerializeField] LineGenerator FirstUILineGenerator;//第一个结果屏幕线条
     [SerializeField] LineGenerator SecondUILineGenerator;//第二个结果屏幕线条
+
+    [Tooltip("没有存在校准数据时候显示提示失败")]
+    [SerializeField]
+    GameObject AutoCalibrationFailedTip;
+
     bool bMarkerFinish = false;
     ScreenPositioningStep perStepView = ScreenPositioningStep.None;//最后一次进入LayoutSuccessful的页面
 
@@ -499,6 +507,36 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
     List<Vector2> getMaskLinePositionsByDeviceType() {
       return DeviceTypeHelper.DetectDeviceType() == DeviceTypeHelper.DeviceType.iPhone ? maskLine.ScreenPositions : maskLine_ipad.ScreenPositions;
     }
+
+    /// <summary>
+    /// 设置校准结束时候的定位按钮
+    /// </summary>
+    /// <param name="active"></param>
+    public void SetAutoConfirmBtnActive(bool active)
+    {
+        if (AutoEndConfirmBtn == null) return;
+
+        Image btnImage = AutoEndConfirmBtn.GetComponent<Image>();
+        if (btnImage == null) return;
+
+        // 根据 active 状态切换按钮外观
+        if (active)
+        {
+            btnImage.color = ConfirmBtnNormalColor;
+            if (ConfirmBtnBg != null)
+            {
+                btnImage.sprite = ConfirmBtnBg;
+            }
+            AutoEndConfirmBtn.interactable = true;
+        }
+        else
+        {
+            btnImage.color = ConfirmBtnHideColor;
+            btnImage.sprite = null; // 去掉背景图
+            AutoEndConfirmBtn.interactable = false;
+        }
+    }
+
     /// <summary>
     /// 根据enum操作ui
     /// </summary>
@@ -510,6 +548,7 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
 
         TipCalibrationFailedIphone.SetActive(false);
         TipCalibrationFailedIpad.SetActive(false);
+        AutoCalibrationFailedTip.SetActive(false);
 
         QuadrilateralInCamera screenAuto = ScreenLocate.Main.ScreenIdentification.QuadAuto;
         switch (step)
@@ -529,7 +568,8 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
                 if (screenAuto == null)
                 {
                     //不存在数据,走流程2
-                    AutoEndConfirmBtn.interactable = false;
+                    SetAutoConfirmBtnActive(false);
+                    //AutoEndConfirmBtn.interactable = false;
                     //TipAutoEndHas.SetActive(false);
                     //TipAutoEnd.SetActive(true);
                     if (DeviceTypeHelper.DetectDeviceType() == DeviceTypeHelper.DeviceType.iPhone) {
@@ -541,7 +581,8 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
                 else
                 {
                     //存在数据,显示确认按钮
-                    AutoEndConfirmBtn.interactable = true;
+                    SetAutoConfirmBtnActive(true);
+                    //AutoEndConfirmBtn.interactable = true;
                     //TipAutoEndHas.SetActive(true);
                     //TipAutoEnd.SetActive(false);
                 }
@@ -790,8 +831,8 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
         SyncQuadUnityVectorListToMarkerPointesPos();
         //显示提示
         pointMarker.ShowHintImageParent(true);
-        AutoEndConfirmBtn.interactable = true;
-
+        //AutoEndConfirmBtn.interactable = true;
+        SetAutoConfirmBtnActive(true);
         if (curStepView == ScreenPositioningStep.Start || curStepView == ScreenPositioningStep.AutoEnd) {
             //如果是开始页面进行自动定位的
             if (curStepView != ScreenPositioningStep.AutoEnd) {
@@ -808,17 +849,22 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
         QuadrilateralInCamera screenSemiAuto = ScreenLocate.Main.ScreenIdentification.QuadSemiAuto;
         if (screenAuto != null)
         {
-            Debug.Log("[校准流程]Successful自动识别screenAuto信息  ------------ ");
+            //Debug.Log("[校准流程]Successful自动识别screenAuto信息  ------------ ");
+            if (AutoCalibrationFailedTip != null)
+                AutoCalibrationFailedTip.SetActive(false);
+
             CurrentUILineGenerator.Points = infraredDemo.ConvertQuadToPoints(screenAuto, texSize);
             FirstUILineGenerator.Points = infraredDemo.ConvertQuadToPoints(screenAuto, texSize);
         }
-        //else
-        //{
-        //    Debug.LogError("screenAuto 不存在!");
-        //}
+        else
+        {
+            if (AutoCalibrationFailedTip != null)
+                AutoCalibrationFailedTip.SetActive(true);
+            //Debug.LogError("screenAuto 不存在!");
+        }
         if (screenSemiAuto != null)
         {
-            Debug.Log("[校准流程]Successful半自动识别screenSemiAuto信息 ------------ ");
+            //Debug.Log("[校准流程]Successful半自动识别screenSemiAuto信息 ------------ ");
             SecondUILineGenerator.Points = infraredDemo.ConvertQuadToPoints(screenSemiAuto, texSize);
         }
         //else
@@ -1073,7 +1119,8 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
             if (curStepView != ScreenPositioningStep.AutoEnd) {
                 SetScreenPositioningStepState(ScreenPositioningStep.AutoEnd);
             }
-            AutoEndConfirmBtn.interactable = false;
+            //AutoEndConfirmBtn.interactable = false;
+            SetAutoConfirmBtnActive(false);
         }
     }
     /// <summary>
@@ -1468,6 +1515,11 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
     //选择全自动结果后进入游戏
     void OnFirstResult()
     {
+        QuadrilateralInCamera screenAuto = ScreenLocate.Main.ScreenIdentification.QuadAuto;
+        if (screenAuto == null) {
+            Debug.Log("校准结果为空!");
+            return;
+        }
         ScreenLocate.Main.SelectScreenAfterLocate(ScreenLocate.ScreenIdentificationTag.Auto);
         UpdateQuadUnityVectorList();
         onCompelete();
@@ -1478,7 +1530,6 @@ public class InfraredScreenPositioningView : JCUnityLib.ViewBase
     {
         ScreenLocate.Main.SelectScreenAfterLocate(ScreenLocate.ScreenIdentificationTag.SemiAuto);
         UpdateQuadUnityVectorList();
-
         onCompelete();
     }
 

+ 1 - 1
ProjectSettings/ProjectSettings.asset

@@ -137,7 +137,7 @@ PlayerSettings:
     16:10: 1
     16:9: 1
     Others: 1
-  bundleVersion: 2.3.1
+  bundleVersion: 2.3.3
   preloadedAssets:
   - {fileID: 11400000, guid: 8ecb9c5da30ac7d4db9243c684f470ea, type: 2}
   metroInputSource: 0