Ver código fonte

1.b端只使用端口连接

slambb 10 meses atrás
pai
commit
7d72c38fd0

+ 36 - 8
Assets/BowArrow/Scripts/Bluetooth/BluetoothAim.cs

@@ -1237,8 +1237,15 @@ public class BluetoothAim : MonoBehaviour
         }
         if (_isHOUYIPRO)
         {
-            //如果是。判断是否连接
-            return status == BluetoothStatusEnum.ConnectSuccess;
+            if (CommonConfig.StandaloneModeOrPlatformB)
+            {
+                return true;
+            }
+            else
+            {
+                //如果是。判断是否连接
+                return status == BluetoothStatusEnum.ConnectSuccess;
+            }
         }
         else {
             return false;
@@ -1262,8 +1269,15 @@ public class BluetoothAim : MonoBehaviour
         }
         if (_isARTEMISPRO)
         {
-            //如果是。判断是否连接
-            return status == BluetoothStatusEnum.ConnectSuccess;
+            if (CommonConfig.StandaloneModeOrPlatformB)
+            {
+                return true;
+            }
+            else
+            {
+                //如果是。判断是否连接
+                return status == BluetoothStatusEnum.ConnectSuccess;
+            }
         }
         else
         {
@@ -1289,8 +1303,15 @@ public class BluetoothAim : MonoBehaviour
         }
         if (_isInfraredDevice)
         {
-            //如果是。判断是否连接
-            return status == BluetoothStatusEnum.ConnectSuccess;
+            if (CommonConfig.StandaloneModeOrPlatformB)
+            {
+                return true;
+            }
+            else {
+                //如果是。判断是否连接
+                return status == BluetoothStatusEnum.ConnectSuccess;
+            }
+         
         }
         else
         {
@@ -1315,8 +1336,15 @@ public class BluetoothAim : MonoBehaviour
         }
         if (_isGun)
         {
-            //如果是。判断是否连接
-            return status == BluetoothStatusEnum.ConnectSuccess;
+            if (CommonConfig.StandaloneModeOrPlatformB)
+            {
+                return true;
+            }
+            else
+            {
+                //如果是。判断是否连接
+                return status == BluetoothStatusEnum.ConnectSuccess;
+            }
         }
         else
         {

+ 7 - 2
Assets/BowArrow/Scripts/View/Home/HomeView.cs

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