소스 검색

激活小吕java服务器

yichael 4 년 전
부모
커밋
d79a6b93cb
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Assets/BowArrow/Scenes/Game.unity
  2. 2 0
      Assets/BowArrow/Scripts/Bluetooth/ShootCheck.cs

+ 1 - 1
Assets/BowArrow/Scenes/Game.unity

@@ -7568,7 +7568,7 @@ MonoBehaviour:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 992649507}
-  m_Enabled: 0
+  m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 11500000, guid: 0640518c4d8627a41a16e391f6b84960, type: 3}
   m_Name: 

+ 2 - 0
Assets/BowArrow/Scripts/Bluetooth/ShootCheck.cs

@@ -37,6 +37,7 @@ public class ShootCheck : MonoBehaviour
 //socket
         string ipStr = ipInputField.text;//ipInputField.GetComponentInChildren<Text>();
         string serverIP = ipStr;//"192.168.0.107";
+        // serverIP = "192.168.0.103";
         string address = "ws://" + serverIP + ":8088/Ble/";
         webSocket = new WebSocket(new Uri(address));
 #if !UNITY_WEBGL
@@ -140,6 +141,7 @@ public class ShootCheck : MonoBehaviour
     {
         int value = TwoByteToInt(b1, b2);
         return (float)value / 32768 * 16;
+        //  return (float)value;
     }
     
     int TwoByteToInt(byte b1, byte b2)