ソースを参照

单机版-连接成功自动跳转开始页面

lvjincheng 2 年 前
コミット
51a40e1508
1 ファイル変更9 行追加0 行削除
  1. 9 0
      Assets/BowArrow/Scripts/Bluetooth/BluetoothAim.cs

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

@@ -259,6 +259,15 @@ public class BluetoothAim : MonoBehaviour
                 {
                     if (status != BluetoothStatusEnum.ConnectSuccess) return;
                     InitWhenConenct();
+                    if (CommonConfig.StandaloneMode)
+                    {
+                        if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "Home" 
+                            && PersistenHandler.ins.menuBackCtr.views.Count == 0 
+                            && !FindObjectOfType<NewUserGuider>())
+                        {
+                            ViewMgr.Instance.ShowView<GameStartView>();
+                        }
+                    }
                 });
             };
             bluetoothHelper.OnConnectionFailed += (BluetoothHelper helper) =>