Explorar o código

发布版本只能用设备完

lvjincheng %!s(int64=3) %!d(string=hai) anos
pai
achega
2550e3e767

+ 1 - 0
Assets/BowArrow/Scripts/CommonConfig.cs

@@ -12,6 +12,7 @@ public class CommonConfig
     //实体模具箭重,单位克
     //实体模具箭重,单位克
     public static float arrowWeight = 75; 
     public static float arrowWeight = 75; 
 
 
+    public static bool isReleaseVersion = true;
     public enum ServerType {LocalTest, Produce};
     public enum ServerType {LocalTest, Produce};
     private static ServerType serverType = ServerType.Produce;
     private static ServerType serverType = ServerType.Produce;
     //业务服务端访问地址
     //业务服务端访问地址

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

@@ -25,7 +25,16 @@ public class BowCamera : MonoBehaviour
     //触摸检测器
     //触摸检测器
     JC.Unity.TouchChecker touchChecker = new JC.Unity.TouchChecker();
     JC.Unity.TouchChecker touchChecker = new JC.Unity.TouchChecker();
     //触摸模式开关
     //触摸模式开关
-    public static bool isTouchMode = true;
+    private static bool _isTouchMode = true;
+    public static bool isTouchMode {
+        get {
+            if (CommonConfig.isReleaseVersion) return false;
+            return _isTouchMode;
+        }
+        set {
+            _isTouchMode = value;
+        }
+    }
     //禁止逻辑,只用于同步状态和渲染,目前用于联机
     //禁止逻辑,只用于同步状态和渲染,目前用于联机
     [NonSerialized] public bool banLogic = false;
     [NonSerialized] public bool banLogic = false;
     private static BowCamera _ins;
     private static BowCamera _ins;

+ 8 - 0
Assets/BowArrow/Scripts/View/HomeView.cs

@@ -101,9 +101,17 @@ public class HomeView : MonoBehaviour
         switch (target)
         switch (target)
         {
         {
             case "开始游戏":
             case "开始游戏":
+                if (!BluetoothStatus.IsAllConnected()) {
+                    PopupMgr.ins.ShowTip("请先连接设备");
+                    return;
+                }
                 GameObject.Instantiate(GameObject.Find("WindowViews").transform.Find("GameStartView").gameObject).SetActive(true);
                 GameObject.Instantiate(GameObject.Find("WindowViews").transform.Find("GameStartView").gameObject).SetActive(true);
                 break;
                 break;
             case "联机游戏":
             case "联机游戏":
+                if (!BluetoothStatus.IsAllConnected()) {
+                    PopupMgr.ins.ShowTip("请先连接设备");
+                    return;
+                }
                 GlobalDataTemp.pkMatchType = PKMatchType.OnlinePK;
                 GlobalDataTemp.pkMatchType = PKMatchType.OnlinePK;
                 GameObject.Instantiate(GameObject.Find("WindowViews").transform.Find("PKGameOptionView").gameObject).SetActive(true);
                 GameObject.Instantiate(GameObject.Find("WindowViews").transform.Find("PKGameOptionView").gameObject).SetActive(true);
                 break;
                 break;