Merge remote-tracking branch 'origin/dev_mobile' into dev_mobile_ble

# Conflicts:
#	Assets/Scripts/App.cs
#	Assets/Scripts/Mobile/WeChatController.cs
This commit is contained in:
lishuo committed 2021-09-02 10:10:06 +08:00
commit c280408192
92 files changed
+27853 -6958

No files matched your search

+6 -3
View File
@@ -486,14 +486,16 @@ public class LoginController : MonoBehaviour
}
async void Init()
{
UIManager.Instance.ModalsPanel = this.transform.Find("ModalPanel").GetComponent<PFUIPanel>();
userInfos = UIManager.Instance.userInfos;
App.DefaultRotateTexture = Utils.ReadTextureFromPlayerPrefs("rotateImage");
App.firstEnter = PlayerPrefs.GetInt("firstEnter");
PlayerPrefs.SetInt("firstEnter", 1);
var notifyId = PlayerPrefs.GetInt("notifyId");
//Task.Run(async () =>
//{
//});
var r = await ConfigHelper.userApi.GetNotify();
if (r.result)
{
@@ -508,13 +510,14 @@ public class LoginController : MonoBehaviour
//#endif
App.notifyContent = r.data.Value<string>("Content");
if (r.data.Value<int>("Id") != notifyId)
if (r.data.Value<int>("Id") != notifyId)//r.data.Value<int>("Id") != notifyId
{
UIManager.ShowNewsModal();
PlayerPrefs.SetInt("notifyId", r.data.Value<int>("Id"));
}
}
GetRotateImage();
}
async void GetRotateImage()
+17 -3
View File
@@ -3,6 +3,7 @@ using Assets.Scripts.Devices.Ant;
using Assets.Scripts.Scenes;
using Assets.Scripts.UI.Prefab.Device;
using Mapbox.Examples;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
@@ -23,11 +24,20 @@ public class MainController : BaseScene
Loom.Initialize();
#if UNITY_ANDROID || UNITY_IOS
transform.GetComponent<CanvasScaler>().referenceResolution = new Vector2(844, 390);
transform.Find("Panel").GetComponent<RectTransform>().sizeDelta = new Vector2(844, 390);
//transform.Find("Panel").GetComponent<RectTransform>().sizeDelta = new Vector2(844, 390);
var rectTransform = transform.Find("Panel").GetComponent<RectTransform>();
rectTransform.anchorMin = Vector2.zero;
rectTransform.anchorMax = Vector2.one;
rectTransform.offsetMin = Vector2.zero;
rectTransform.offsetMax = Vector2.zero;
//var rect1 = transform.Find("GameObject").GetComponent<RectTransform>();
//rect1.anchorMin = Vector2.zero;
//rect1.anchorMax = Vector2.one;
//rect1.offsetMin = Vector2.zero;
//rect1.offsetMax = Vector2.zero;
//transform.Find("ModalPanel").GetComponent<RectTransform>().sizeDelta = new Vector2(844, 390);
#else
App.MainDeviceAdapter.StartScan();
#endif
App.MainDeviceAdapter.StartScan();
}
// Start is called before the first frame update
@@ -36,6 +46,10 @@ public class MainController : BaseScene
UIManager.Instance.Root = root;
UIManager.Instance.MainPanel = this.transform.Find("Panel").GetComponent<PFUIPanel>();
UIManager.Instance.ModalsPanel = this.transform.Find("ModalPanel").GetComponent<PFUIPanel>();
transform.Find("MobileInfo/BatteryText").GetComponent<Text>().text =
$"{Math.Round(SystemInfo.batteryLevel * 100, 0)}%";
transform.Find("MobileInfo/TimeText").GetComponent<Text>().text =
DateTime.Now.ToString("HH:mm");
#if UNITY_EDITOR
if (App.CurrentUser == null) //App.CurrentUser == null
{