lvjincheng 3 gadi atpakaļ
vecāks
revīzija
32e8c9d605

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

@@ -244,8 +244,10 @@ public class BluetoothAim : MonoBehaviour
             Debug.LogError(e.StackTrace);
             scanLock = false;
             canConnect = true;
-            SetStatus(BluetoothStatusEnum.ConnectFail);
-            Log("请打开蓝牙");
+            // SetStatus(BluetoothStatusEnum.ConnectFail);
+            status = BluetoothStatusEnum.Connect;
+            userDoConnect = false;
+            PopupMgr.ins.ShowTip(TextAutoLanguage2.GetTextByKey("ble-please-open-ble"));
         }
     }
 

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

@@ -86,5 +86,6 @@
     "tip_pk_friend-invite-join": "好友邀请你参加",
     "tip_pk_invite-try-again": "对方邀请你再来一次",
     "tip_mag-calibrate-variance-equal": "地磁校准方差 = ",
-    "about-us_content": "<color=#FFFFFF00>缩进</color>青凤鸾是一个技能运动智能硬件品牌。产品包含智能弓箭、智能射击、智能滑雪、智能高尔夫等。青凤鸾希望通过创新的智能硬件,让技能运动变得触手可及。并在疫情的大环境下,让人们的室内运动生活更加丰富有趣。"
+    "about-us_content": "<color=#FFFFFF00>缩进</color>青凤鸾是一个技能运动智能硬件品牌。产品包含智能弓箭、智能射击、智能滑雪、智能高尔夫等。青凤鸾希望通过创新的智能硬件,让技能运动变得触手可及。并在疫情的大环境下,让人们的室内运动生活更加丰富有趣。",
+    "ble-please-open-ble": "请先打开手机蓝牙"
 }

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

@@ -87,6 +87,7 @@
     "tip_pk_invite-try-again": "Invite Again ",
     "tip_mag-calibrate-variance-equal": "Mag Calibrate Variance = ",
     "about-us_content": "Qingfengluan is a skill sports intelligent hardware brand. Products include intelligent bow and arrow, intelligent shooting, intelligent skiing, intelligent golf, etc. Qingfengluan hopes to make skill sports accessible through innovative intelligent hardware. And in the context of the epidemic, make people's indoor sports life more rich and interesting.",
+    "ble-please-open-ble": "Please Open Bluetooth",
     "当前正处于匹配状态,无法接受好友PK邀请!": "In matching, can't accept PK!",
     "目前状态下,无法接受该邀请!": "In current state, can't accept invite!",
     "某方退出或掉线,联机游戏终止!": "One quit or outline, game stop!",

+ 1 - 0
Assets/BowArrow/Scripts/Game/GameAssistUI.cs

@@ -248,6 +248,7 @@ public class GameAssistUI : MonoBehaviour
 
         CrossHair.ins.gameObject.GetComponent<RectTransform>().sizeDelta =  
             open ? new Vector2(500, 500) : new Vector2(260, 260);
+        if (open) CrossHair.ins.transform.localPosition = Vector3.zero;
 
         bowCamera.banCameraFieldOfView = open;
         bowCamera.SetScaleAimDisplaying(isScaleAimDisplaying);

+ 30 - 9
Assets/BowArrow/Scripts/View/DeviceCalibrateView.cs

@@ -53,6 +53,21 @@ public class DeviceCalibrateView : MonoBehaviour
                 GameMgr.ins.FinishDeviceCalibrateGuide();
             }
         });
+        if (guide) { //看看哪项没校准,就引导校准
+            List<DeviceCalibrateItem> guideList = new List<DeviceCalibrateItem>();
+            if (string.IsNullOrEmpty(PlayerPrefs.GetString("o0GyrCalibrater", null))) {
+                guideList.Add(DeviceCalibrateItem.Gyr);
+            }
+            if (string.IsNullOrEmpty(PlayerPrefs.GetString("o0MagneticCalibrater", null))) {
+                guideList.Add(DeviceCalibrateItem.Mag);
+            }
+            deviceCalibrateItemForGuide = guideList.ToArray();
+            if (deviceCalibrateItemForGuide.Length == 0) {
+                guideIndex = -1;
+                btnFinish.GetComponent<Button>().onClick.Invoke();
+                return;
+            }
+        }
         RefreshPage();
     }
 
@@ -85,18 +100,24 @@ public class DeviceCalibrateView : MonoBehaviour
     void RefreshPage() {
         if (guide) {
             deviceCalibrateItem = deviceCalibrateItemForGuide[guideIndex];
-            if (guideIndex == 0) {
+            if (deviceCalibrateItemForGuide.Length == 1) {
                 btnBack.gameObject.SetActive(false);
-                btnNext.gameObject.SetActive(true);
-                btnFinish.gameObject.SetActive(false);
-            } else if (guideIndex == deviceCalibrateItemForGuide.Length - 1) {
-                btnBack.gameObject.SetActive(true);
                 btnNext.gameObject.SetActive(false);
-                btnFinish.gameObject.SetActive(true);    
+                btnFinish.gameObject.SetActive(true); 
             } else {
-                btnBack.gameObject.SetActive(true);
-                btnNext.gameObject.SetActive(true);
-                btnFinish.gameObject.SetActive(false);
+                if (guideIndex == 0) {
+                    btnBack.gameObject.SetActive(false);
+                    btnNext.gameObject.SetActive(true);
+                    btnFinish.gameObject.SetActive(false);
+                } else if (guideIndex == deviceCalibrateItemForGuide.Length - 1) {
+                    btnBack.gameObject.SetActive(true);
+                    btnNext.gameObject.SetActive(false);
+                    btnFinish.gameObject.SetActive(true);    
+                } else {
+                    btnBack.gameObject.SetActive(true);
+                    btnNext.gameObject.SetActive(true);
+                    btnFinish.gameObject.SetActive(false);
+                }
             }
         } else {
             btnBack.gameObject.SetActive(false);

+ 167 - 0
ProjectSettings/SceneTemplateSettings.json

@@ -0,0 +1,167 @@
+{
+    "templatePinStates": [],
+    "dependencyTypeInfos": [
+        {
+            "userAdded": false,
+            "type": "UnityEngine.AnimationClip",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEditor.Animations.AnimatorController",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.AnimatorOverrideController",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEditor.Audio.AudioMixerController",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.ComputeShader",
+            "ignore": true,
+            "defaultInstantiationMode": 1,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.Cubemap",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.GameObject",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEditor.LightingDataAsset",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": false
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.LightingSettings",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.Material",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEditor.MonoScript",
+            "ignore": true,
+            "defaultInstantiationMode": 1,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.PhysicMaterial",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.PhysicsMaterial2D",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.Rendering.VolumeProfile",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEditor.SceneAsset",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": false
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.Shader",
+            "ignore": true,
+            "defaultInstantiationMode": 1,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.ShaderVariantCollection",
+            "ignore": true,
+            "defaultInstantiationMode": 1,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.Texture",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.Texture2D",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        },
+        {
+            "userAdded": false,
+            "type": "UnityEngine.Timeline.TimelineAsset",
+            "ignore": false,
+            "defaultInstantiationMode": 0,
+            "supportsModification": true
+        }
+    ],
+    "defaultDependencyTypeInfo": {
+        "userAdded": false,
+        "type": "<default_scene_template_dependencies>",
+        "ignore": false,
+        "defaultInstantiationMode": 1,
+        "supportsModification": true
+    },
+    "newSceneOverride": 0
+}