From 8dfd4d696cc0e3d619c3870720f868c0f3eb38b2 Mon Sep 17 00:00:00 2001 From: lishuo Date: Thu, 10 Jun 2021 18:14:14 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AA=91=E8=A1=8C=E9=A1=B5=E9=9D=A2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=94=99=E8=AF=AF=E8=AF=8A=E6=96=AD=EF=BC=8C=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E8=A7=86=E8=A7=92=E5=88=87=E6=8D=A2=E7=AE=AD=E5=A4=B4?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E5=9B=9E=E5=88=B0=E8=B5=B7=E7=82=B9=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/Ride/Scripts/CyclingController.cs | 12 ++++-------- Assets/Scenes/Ride/Scripts/DeviceServiceMonoBase.cs | 3 ++- Assets/Scenes/Ride/Scripts/SingleUIManager.cs | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Assets/Scenes/Ride/Scripts/CyclingController.cs b/Assets/Scenes/Ride/Scripts/CyclingController.cs index e4ac450b..47363e04 100644 --- a/Assets/Scenes/Ride/Scripts/CyclingController.cs +++ b/Assets/Scenes/Ride/Scripts/CyclingController.cs @@ -59,8 +59,10 @@ public class CyclingController : DeviceServiceMonoBase } GameObject miniMap; GameObject resultPanel; - void Awake() + + protected override void Awake() { + base.Awake(); #if UNITY_EDITOR if (App.CurrentUser == null) { @@ -390,9 +392,7 @@ public class CyclingController : DeviceServiceMonoBase player.transform.position = pos; player.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f); target.position = pos; - playerController.currentPos = Vector3.zero; - - + //playerController.currentPos = Vector3.zero; arrowGameObj.SetActive(true); Is3dView = false; } @@ -608,8 +608,4 @@ public class CyclingController : DeviceServiceMonoBase return list; } #endregion - private void OnApplicationQuit() - { - App.MainDeviceAdapter.Dispose(); - } } diff --git a/Assets/Scenes/Ride/Scripts/DeviceServiceMonoBase.cs b/Assets/Scenes/Ride/Scripts/DeviceServiceMonoBase.cs index 202748ea..b8240cb0 100644 --- a/Assets/Scenes/Ride/Scripts/DeviceServiceMonoBase.cs +++ b/Assets/Scenes/Ride/Scripts/DeviceServiceMonoBase.cs @@ -3,6 +3,7 @@ using Assets.Scripts.Devices; using Assets.Scripts.Devices.Ant; using Assets.Scripts.Devices.Ant.Interfaces; using Assets.Scripts.Devices.Ble; +using Assets.Scripts.Scenes; using System; using System.Collections.Generic; using System.Linq; @@ -10,7 +11,7 @@ using UnityEngine; namespace Assets.Scenes.Ride.Scripts { - public class DeviceServiceMonoBase: MonoBehaviour + public class DeviceServiceMonoBase: BaseScene { public void TrackResistance(double grade) { diff --git a/Assets/Scenes/Ride/Scripts/SingleUIManager.cs b/Assets/Scenes/Ride/Scripts/SingleUIManager.cs index 1c2c7118..a11ba7a7 100644 --- a/Assets/Scenes/Ride/Scripts/SingleUIManager.cs +++ b/Assets/Scenes/Ride/Scripts/SingleUIManager.cs @@ -280,7 +280,7 @@ namespace Assets.Scenes.Ride.Scripts //开发者视角调整 cameraSlider = transform.Find("Panel/CameraSlider").GetComponent(); Text CameraText = transform.Find("Panel/CameraSlider/Text").GetComponent(); - string[] phoneList = new string[] { "18120141032", "15651831367", "13115011550", "15261826280" }; + string[] phoneList = new string[] { "18120141032", "15651831367", "18120141031", "15261826280", "18662240319" }; if (phoneList.Contains(App.CurrentUser.Phone)) { cameraSlider.gameObject.SetActive(true);