Explorar el Código

连上蓝牙时就取消触摸模式

lvjincheng hace 4 años
padre
commit
a85bb462b6

+ 1 - 0
Assets/BowArrow/Scripts/Bluetooth/BluetoothAim.cs

@@ -129,6 +129,7 @@ public class BluetoothAim : MonoBehaviour
                 CallDelay(3, delegate() {
                     WriteData(SceneManager.GetActiveScene().name == "Game" ? "b" :"B");
                 });
+                BowCamera.isTouchMode = false;
             };
             bluetoothHelper.OnConnectionFailed += (BluetoothHelper helper) =>
             {

+ 1 - 1
Assets/BowArrow/Scripts/Game/BowCamera.cs

@@ -23,7 +23,7 @@ public class BowCamera : MonoBehaviour
     //本地欧拉角记录值
     Vector3 localEulerAngles;
     //触摸模式开关
-    bool isTouchMode = true;
+    public static bool isTouchMode = true;
     public static BowCamera ins;
 
     void Awake() {