场景加载处理一些卡顿的情况

This commit is contained in:
lishuo committed 2021-04-02 19:17:23 +08:00
1 parent e7a3214cb5
commit 65fc5b5c50
35 files changed
+8668 -2075

No files matched your search

+4 -1
View File
@@ -1,4 +1,5 @@
using System.Collections;
using Assets.Scripts.Apis.Models;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -9,4 +10,6 @@ public static class App
public static string AppVersion = "1.0.0";
public static int RouteIdParam = 0;
public static UserResultModel CurrentUser { get; set; }
}
+1 -1
View File
@@ -192,7 +192,7 @@ public class LoginController : MonoBehaviour
//var res = await NoAuthApi.Login(phone.text, pwd.text);
if (res.result)
{
ConfigHelper.CurrentUser = res.data;
App.CurrentUser = res.data;
SceneManager.LoadScene("MainScene");
}
else
@@ -70,7 +70,7 @@ public class HomeController : PFUIPanel
void SetCurrentUser()
{
var user = ConfigHelper.CurrentUser;
var user = App.CurrentUser;
Ftp.text = user.FTP.ToString();
Weight.text = user.Weight.ToString();
WKG.text = $"{user.Weight}KG/{user.BicycleWeight}KG";
+13
View File
@@ -64,6 +64,15 @@ public class UIManager : MonoBehaviour
}
}
private CyclingController mCyclingController;
public CyclingController CyclingController
{
get
{
return this.GetPanelInstance("CyclingController", ref this.mCyclingController);
}
}
private EditUserController mEditUserController;
public EditUserController EditUserPanel
{
@@ -176,6 +185,10 @@ public class UIManager : MonoBehaviour
{
UIManager.Show(UIManager.Instance.HomePanel, UIManager.Instance.MainPanel);
}
public static void ShowCyclingController()
{
UIManager.Show(UIManager.Instance.CyclingController, UIManager.Instance.MainPanel);
}
public static void ShowDevicePanel()
{