From 86a5b68317a5d58b293207bd6c3429f44431320b Mon Sep 17 00:00:00 2001 From: CaiYanPeng Date: Tue, 27 Apr 2021 18:26:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Cyp/Common.meta | 8 - Assets/Cyp/Common/Global.cs | 19 - Assets/Cyp/Common/Global.cs.meta | 11 - Assets/Cyp/Common/Utils.cs | 60 - Assets/Cyp/Common/Utils.cs.meta | 11 - Assets/Cyp/DemoScript.cs | 24 - Assets/Cyp/DemoScript.cs.meta | 11 - Assets/Cyp/ImageRotate.cs | 30 - Assets/Cyp/ImageRotate.cs.meta | 11 - Assets/Cyp/Main.cs | 68 - Assets/Cyp/Main.cs.meta | 11 - Assets/NuGet.meta | 8 - Assets/Resources/Images/64-17.png | Bin 0 -> 1468 bytes Assets/Resources/Images/64-17.png.meta | 116 + Assets/Resources/UI/Control/PfUIButton.prefab | 18 +- Assets/Resources/UI/Prefab/MainNav.prefab | 57 +- .../UI/Prefab/Panel/BigMapPanel.prefab | 9 +- .../UI/Prefab/Panel/EditUserPanel.prefab | 500 +- .../UI/Prefab/Panel/MapListPanel.prefab | 165 +- .../UI/Prefab/Panel/UserInfoPanel.prefab | 182 +- .../{ResultList => }/RideResultList.prefab | 2 +- .../RideResultList.prefab.meta | 0 .../Resources/UI/Prefab/ToastContainer.prefab | 66 +- Assets/Scenes/1-Login.unity | 4764 +++++++++-------- .../Scenes/Ride/Scripts/NearByItemScript.cs | 3 +- .../Ride/Scripts/SelectPlayerItemScript.cs | 2 +- Assets/Scenes/Ride/Scripts/SingleUIManager.cs | 2 +- Assets/Scripts/Devices/Ant/AntConnector.cs | 2 +- Assets/Scripts/Scenes/LoginController.cs | 1 + Assets/Scripts/UI/Control/PFUIDropdown.cs | 11 +- Assets/Scripts/UI/Control/PfUIButton.cs | 1 + .../UI/Prefab/Device/ConnectDeviceModal.cs | 16 +- .../Scripts/UI/Prefab/FeedbackController.cs | 2 +- .../UI/Prefab/MapList/MapFilterOptions.cs | 2 +- .../UI/Prefab/Panel/EditUserController.cs | 11 +- .../UI/Prefab/Panel/MapListController.cs | 2 +- .../UI/Prefab/Panel/UserInfoController.cs | 5 +- .../Scripts/UI/Prefab/ResultList/RouteItem.cs | 2 +- Assets/Scripts/Utils/Utils.cs | 36 +- 39 files changed, 3489 insertions(+), 2760 deletions(-) delete mode 100644 Assets/Cyp/Common.meta delete mode 100644 Assets/Cyp/Common/Global.cs delete mode 100644 Assets/Cyp/Common/Global.cs.meta delete mode 100644 Assets/Cyp/Common/Utils.cs delete mode 100644 Assets/Cyp/Common/Utils.cs.meta delete mode 100644 Assets/Cyp/DemoScript.cs delete mode 100644 Assets/Cyp/DemoScript.cs.meta delete mode 100644 Assets/Cyp/ImageRotate.cs delete mode 100644 Assets/Cyp/ImageRotate.cs.meta delete mode 100644 Assets/Cyp/Main.cs delete mode 100644 Assets/Cyp/Main.cs.meta delete mode 100644 Assets/NuGet.meta create mode 100644 Assets/Resources/Images/64-17.png create mode 100644 Assets/Resources/Images/64-17.png.meta rename Assets/Resources/UI/Prefab/{ResultList => }/RideResultList.prefab (99%) rename Assets/Resources/UI/Prefab/{ResultList => }/RideResultList.prefab.meta (100%) diff --git a/Assets/Cyp/Common.meta b/Assets/Cyp/Common.meta deleted file mode 100644 index 72dd4f1d..00000000 --- a/Assets/Cyp/Common.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 70c79ab2ae1f7d74ba14708c3d4a2e6d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Cyp/Common/Global.cs b/Assets/Cyp/Common/Global.cs deleted file mode 100644 index 45f616a1..00000000 --- a/Assets/Cyp/Common/Global.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Assets.Scripts.Apis; -using Assets.Scripts.Apis.Models; -using Newtonsoft.Json.Linq; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Assets.Cyp.Common -{ - public static class Global - { - public static UserResultModel CurrentUser { get; set; } - public static UserApi userApi = new UserApi(); - public static MapApi mapApi = new MapApi(); - public static MapInterruptRecordApi mapInterruptRecordApi = new MapInterruptRecordApi(); - } -} diff --git a/Assets/Cyp/Common/Global.cs.meta b/Assets/Cyp/Common/Global.cs.meta deleted file mode 100644 index f4963062..00000000 --- a/Assets/Cyp/Common/Global.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f084ba73ccb087147bbf5c9d7201a06e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Cyp/Common/Utils.cs b/Assets/Cyp/Common/Utils.cs deleted file mode 100644 index e09cfb37..00000000 --- a/Assets/Cyp/Common/Utils.cs +++ /dev/null @@ -1,60 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using UnityEngine; -using UnityEngine.Networking; -using UnityEngine.UI; - -namespace Assets.Cyp.Common -{ - public static class Utils - { - - /*显示简略提示,需要拖Toast的预制件,且保证其他组件名字不是Toast,ToastContainer*/ - public static void showToast(GameObject game,string text,int duration = 1) - { - var toast = Utils.FindUpParent(game.transform).Find("ToastContainer"); - if (toast!=null) - { - toast.GetComponent().showToast(JsonConvert.SerializeObject(new - { - text, - duration - })); - //toast.SendMessage("showToast", ); - } - } - /*显示简略提示,需要拖Toast的预制件,且保证其他组件名字不是Toast,ToastContainer*/ - - /*显示网络图片*/ - public delegate Coroutine StartCoroutine(IEnumerator routine); - public static void DisplayImage(StartCoroutine startCoroutine,RawImage img, string url) - { - startCoroutine(DownloadImage(img, url)); - } - static IEnumerator DownloadImage(RawImage img,string MediaUrl) - { - UnityWebRequest request = UnityWebRequestTexture.GetTexture(MediaUrl); - yield return request.SendWebRequest(); - if (request.isNetworkError || request.isHttpError) - Debug.Log(request.error); - else - img.texture = ((DownloadHandlerTexture)request.downloadHandler).texture; - } - /*显示网络图片*/ - - /*获取最顶层对象*/ - public static Transform FindUpParent(Transform zi) - { - if (zi.parent == null) - return zi; - else - return FindUpParent(zi.parent); - } - /*获取最顶层对象*/ - } -} diff --git a/Assets/Cyp/Common/Utils.cs.meta b/Assets/Cyp/Common/Utils.cs.meta deleted file mode 100644 index 74e749db..00000000 --- a/Assets/Cyp/Common/Utils.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5b26057ccd9f0954f8ffbddd5c7ca8a8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Cyp/DemoScript.cs b/Assets/Cyp/DemoScript.cs deleted file mode 100644 index fa6358e0..00000000 --- a/Assets/Cyp/DemoScript.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.SceneManagement; -using UnityEngine.UI; - -public class DemoScript : MonoBehaviour -{ - [SerializeField] Button button; - // Start is called before the first frame update - void Start() - { - button.onClick.AddListener(()=> - { - SceneManager.UnloadSceneAsync("4-Demo"); - }); - } - - // Update is called once per frame - void Update() - { - - } -} diff --git a/Assets/Cyp/DemoScript.cs.meta b/Assets/Cyp/DemoScript.cs.meta deleted file mode 100644 index babafa87..00000000 --- a/Assets/Cyp/DemoScript.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 232bc1a830e1f7344887323f3b110026 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Cyp/ImageRotate.cs b/Assets/Cyp/ImageRotate.cs deleted file mode 100644 index e753c01f..00000000 --- a/Assets/Cyp/ImageRotate.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.UI; - -public class ImageRotate : MonoBehaviour -{ - float rotation = 360; - // Use this for initialization - void Start() - { - //Debug.Log ("Material used: "+animMat.name); - } - - void Update() - { - Debug.Log(Time.deltaTime); - transform.Rotate(Vector3.back); - //if (Time.frameCount % 1 == 0) - //{ - // float i = new System.Random().NextDouble() < .5 ? -0.5f : 2f; - // transform.rotation = Quaternion.Euler(0, 0, rotation += (float)(i * new System.Random().NextDouble())); - // if (rotation < 0) - // { - // rotation = 360; - // } - //} - - } -} diff --git a/Assets/Cyp/ImageRotate.cs.meta b/Assets/Cyp/ImageRotate.cs.meta deleted file mode 100644 index dd744fc9..00000000 --- a/Assets/Cyp/ImageRotate.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 219017a4cf0dd2d4b8118d5723644209 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Cyp/Main.cs b/Assets/Cyp/Main.cs deleted file mode 100644 index ac0111bd..00000000 --- a/Assets/Cyp/Main.cs +++ /dev/null @@ -1,68 +0,0 @@ -using Assets.Cyp.Common; -using Newtonsoft.Json.Linq; -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.Networking; -using UnityEngine.SceneManagement; -using UnityEngine.UI; - -public class Main : MonoBehaviour -{ - [SerializeField] Text NickName; - [SerializeField] Text TotalKM; - [SerializeField] RawImage Avatar; - [SerializeField] GameObject BtnRide; - // Start is called before the first frame update - void Start() - { - if (Global.CurrentUser != null) - { - SetCurrentUser(); - } - GetSummary(); - if (BtnRide != null) - { - BtnRide.GetComponent