Explorar o código

添加一个禁用蓝牙连接bool

slambb hai 10 meses
pai
achega
b63022cb83

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

@@ -57,9 +57,9 @@ public class InfraredDemo : JCUnityLib.ViewBase
             reporter = obj.GetComponent<Reporter>();
             Application.logMessageReceived += HandleLog;
             // 模拟错误日志
-            Debug.LogError("Test Error: This is a simulated error message.");
+            // Debug.LogError("Test Error: This is a simulated error message.");
             // 模拟异常日志
-            Debug.LogException(new System.Exception("Test Exception: This is a simulated exception."));
+            // Debug.LogException(new System.Exception("Test Exception: This is a simulated exception."));
         }
 
         if (Application.platform != RuntimePlatform.WindowsEditor) DebugInEditor = false;

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

@@ -1237,7 +1237,7 @@ public class BluetoothAim : MonoBehaviour
         }
         if (_isHOUYIPRO)
         {
-            if (CommonConfig.StandaloneModeOrPlatformB)
+            if (CommonConfig.bDisableBluetooth)
             {
                 return true;
             }
@@ -1269,7 +1269,7 @@ public class BluetoothAim : MonoBehaviour
         }
         if (_isARTEMISPRO)
         {
-            if (CommonConfig.StandaloneModeOrPlatformB)
+            if (CommonConfig.bDisableBluetooth)
             {
                 return true;
             }
@@ -1303,7 +1303,7 @@ public class BluetoothAim : MonoBehaviour
         }
         if (_isInfraredDevice)
         {
-            if (CommonConfig.StandaloneModeOrPlatformB)
+            if (CommonConfig.bDisableBluetooth)
             {
                 return true;
             }
@@ -1336,7 +1336,7 @@ public class BluetoothAim : MonoBehaviour
         }
         if (_isGun)
         {
-            if (CommonConfig.StandaloneModeOrPlatformB)
+            if (CommonConfig.bDisableBluetooth)
             {
                 return true;
             }

+ 4 - 1
Assets/BowArrow/Scripts/CommonConfig.cs

@@ -138,7 +138,10 @@ public class CommonConfig
     public static OperatingPlatform OP { get; } = OperatingPlatform.C;
 
     //是否是投币功能
-    public static bool bSupportCoin { get; } = false; 
+    public static bool bSupportCoin { get; } = false;
+
+    //是否禁用蓝牙(目前是b端端口连接情况下设置)
+    public static bool bDisableBluetooth { get; } = false;
 
     #endregion
 

+ 1 - 1
Assets/BowArrow/Scripts/View/Home/HomeView.cs

@@ -90,7 +90,7 @@ public class HomeView : JCUnityLib.ViewBase
 
         yield return new WaitForSeconds(1.0f);
         //不是B 端进行蓝牙连接
-        if (!CommonConfig.StandaloneModeOrPlatformB)
+        if (!CommonConfig.bDisableBluetooth)
         {
             //进行一次蓝牙连接
             BluetoothAim.ins.HomeViewConnectBLE();