|
|
@@ -116,6 +116,7 @@ public class BluetoothAim : MonoBehaviour
|
|
|
if (AimHandler.ins) AimHandler.ins.SetMsOldDefault();
|
|
|
}
|
|
|
|
|
|
+ float notUserDoConnectTime = 0;
|
|
|
void Update()
|
|
|
{
|
|
|
if (userDoConnect && status == BluetoothStatusEnum.Connect)
|
|
|
@@ -123,6 +124,26 @@ public class BluetoothAim : MonoBehaviour
|
|
|
DoConnect();
|
|
|
}
|
|
|
if (doConnect) Connect();
|
|
|
+ if (CommonConfig.StandaloneMode)
|
|
|
+ {
|
|
|
+ if (!userDoConnect && status == BluetoothStatusEnum.Connect)
|
|
|
+ {
|
|
|
+ if (notUserDoConnectTime == 0)
|
|
|
+ {
|
|
|
+ DoConnect();
|
|
|
+ notUserDoConnectTime = 0.1f;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ notUserDoConnectTime += Time.deltaTime;
|
|
|
+ if (notUserDoConnectTime > 60)
|
|
|
+ {
|
|
|
+ DoConnect();
|
|
|
+ notUserDoConnectTime = 0.1f;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void SetStatus(BluetoothStatusEnum statusValue)
|