Bläddra i källkod

更换设备选项时(16G和64G),关闭设备连接

lvjincheng 4 år sedan
förälder
incheckning
b83319809f
1 ändrade filer med 5 tillägg och 0 borttagningar
  1. 5 0
      Assets/BowArrow/Scripts/View/DeviceView.cs

+ 5 - 0
Assets/BowArrow/Scripts/View/DeviceView.cs

@@ -83,6 +83,11 @@ public class DeviceView : MonoBehaviour
                 //save
                 LoginMgr.myUserInfo.arrowAccValue = acc;
                 LoginMgr.myUserInfo.Save();
+
+                //关闭设备连接,用于提醒更换设备
+                if (BluetoothShoot.ins.status == BluetoothStatusEnum.ConnectSuccess) {
+                    BluetoothShoot.ins.DoConnect();
+                }
             });
         }
         SelectAccForArrow(LoginMgr.myUserInfo.arrowAccValue);