Selaa lähdekoodia

添加响应接口

slambb 1 vuosi sitten
vanhempi
sitoutus
33480e0c1f

+ 2 - 2
Assets/BowArrow/Resources/Textures/GameIcon/Prefabs/Views/Home/HomeView.prefab

@@ -9653,7 +9653,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 0
+  m_IsActive: 1
 --- !u!224 &2380280116642831893
 RectTransform:
   m_ObjectHideFlags: 0
@@ -9671,7 +9671,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 1, y: 1}
   m_AnchorMax: {x: 1, y: 1}
-  m_AnchoredPosition: {x: -161, y: -153}
+  m_AnchoredPosition: {x: -448, y: -236.03}
   m_SizeDelta: {x: 123, y: 123}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &3485226410561197407

+ 17 - 0
Assets/BowArrow/Scripts/SerialPortHelper.cs

@@ -80,6 +80,19 @@ public class SerialPortHelper : MonoBehaviour
         //0x04  ±ê¶¨¼ü- ¶Ì°´
         //0x05  ±ê¶¨¼ü- ³¤°´£¨1.5Ã룩
         //0x06  ±ê¶¨¼ü- Ë«»÷
+
+        switch (bytes[3])
+        {
+            case 0x04:
+                AimHandler.ins.OnDataReceived(new byte[] { 0x66, 0x31 });
+                break;
+            case 0x05:
+                AimHandler.ins.OnDataReceived(new byte[] { 0x66, 0x32 });
+                break;
+            case 0x06:
+
+                break;
+        }
     }
     #endregion
 
@@ -141,6 +154,10 @@ public class SerialPortHelper : MonoBehaviour
                 }
             }
         }
+        // ºìÍâÉä»÷¼ì²â
+        byte[] shootBytes = new byte[] { bytes[0], bytes[1], bytes[3], bytes[4], bytes[5] };
+        ShootCheck.ins.ShootByInfrared(shootBytes);
+
     }
     #endregion
 }