Explorar o código

1.修复因延迟删除时候重复校准问题

slambb hai 1 ano
pai
achega
95667514e1

+ 6 - 0
Assets/BowArrow/Modules/InfraredGuider/InfraredGuider.cs

@@ -31,6 +31,12 @@ public class InfraredGuider : MonoBehaviour
 #if  UNITY_STANDALONE_WIN || UNITY_EDITOR
         resulutionButton.gameObject.SetActive(false);
 #endif
+        //ǹÔÝʱ²»ÏÔʾ
+        if (BluetoothAim.ins.isMainConnectToGun()) {
+            Title1ARTEMISPro.SetActive(false);
+            Title1.SetActive(false);
+        }
+        else
         //Çл»ARTEMISPro
         if (BluetoothAim.ins.isMainConnectToARTEMISPRO()) {
             Title1ARTEMISPro.SetActive(true);

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

@@ -78,9 +78,15 @@ public class AutoResetView : MonoBehaviour
     float prepareTime = 3;
     int showedPrepareTime;
 
+    bool bEnd = false;
+
     void Update() {
         prepareTime -= Time.deltaTime;
         if (prepareTime <= 0) {
+            //防止多次调用
+            if (bEnd) return;
+            bEnd = true;
+            
             try {
                 if (SceneManager.GetActiveScene().name.StartsWith("WildAttack"))
                 {
@@ -99,8 +105,6 @@ public class AutoResetView : MonoBehaviour
 
                     }
                 }
-             
-             
             }
             catch (Exception) {}
             //先隐藏子物体