lvjincheng 4 lat temu
rodzic
commit
c3b6c6e8bf

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

@@ -193,6 +193,10 @@ public class BluetoothAim : MonoBehaviour
         WriteData("b");
     }
 
+    public void ReplyInfraredShoot() {
+        WriteData("I");
+    }
+
     void CallDelay(float delayTime, TweenCallback callback)
     {
         Sequence sequence = DOTween.Sequence();

+ 1 - 1
Assets/BowArrow/Scripts/Bluetooth/ShootCheck.cs

@@ -351,7 +351,7 @@ public class ShootCheck : MonoBehaviour
         if (DebugForDevice.ins) DebugForDevice.ins.LogInfrared(logTxt);
         //收到射箭数据,就回复硬件,否则n毫秒后硬件会认为丢包进行重传
         try {
-            if (sumCheckRes) BluetoothAim.ins.WriteData("I"); //如果数据正确,则回复硬件
+            if (sumCheckRes) BluetoothAim.ins.ReplyInfraredShoot(); //如果数据正确,则回复硬件
         } catch (Exception) {}
         //打印到nodejs
         try {