暂存
This commit is contained in:
1 parent
558fb16160
commit
f92b623349
14 files changed
+696
-597
No files matched your search
@@ -128,6 +128,11 @@ public class LoginController : BaseScene
|
||||
#elif UNITY_IOS
|
||||
Input.location.Start();
|
||||
#endif
|
||||
UIManager.SetModalPanel(transform.Find("ModalPanel").GetComponent<PFUIPanel>());
|
||||
if (!string.IsNullOrEmpty(App.is401))
|
||||
{
|
||||
Utils.showToast(null, App.is401);
|
||||
}
|
||||
Init();
|
||||
if (loginScrollView != null)
|
||||
{
|
||||
@@ -501,36 +506,14 @@ public class LoginController : BaseScene
|
||||
transform.Find("Panel").Find("Version").GetComponent<Text>().text = $"V{App.AppVersion}";
|
||||
#endif
|
||||
}
|
||||
|
||||
public void Test(string key)
|
||||
{
|
||||
Debug.Log(key);
|
||||
}
|
||||
async void Init()
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
System.Net.NetworkInformation.Ping ping = new System.Net.NetworkInformation.Ping();
|
||||
System.Timers.Timer timer = new System.Timers.Timer();
|
||||
timer.Interval = 1000;
|
||||
timer.AutoReset = true;
|
||||
timer.Elapsed += new ElapsedEventHandler((o, e) =>
|
||||
{
|
||||
var reply = ping.Send("47.97.84.8");
|
||||
if (reply.Status == System.Net.NetworkInformation.IPStatus.Success)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
App.delayTime = new System.Random().Next(300);
|
||||
#else
|
||||
App.delayTime = reply.RoundtripTime;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
App.delayTime = -1;
|
||||
}
|
||||
});
|
||||
timer.Start();
|
||||
});
|
||||
|
||||
Debug.Log(535);
|
||||
UIManager.Instance.ModalsPanel = this.transform.Find("ModalPanel").GetComponent<PFUIPanel>();
|
||||
userInfos = UIManager.Instance.userInfos;
|
||||
|
||||
@@ -514,11 +514,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
//显示设备连接
|
||||
public void ShowDevicePanel(BaseEventData baseEventData)
|
||||
{
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
UIManager.ShowDevicePanel();
|
||||
#else
|
||||
UIManager.Show(UIManager.Instance.DevicePanel, uipanel.GetComponent<PFUIPanel>());
|
||||
#endif
|
||||
mainController.ShowDevice(null);
|
||||
}
|
||||
//显示设置
|
||||
public void ShowSettingPanel(BaseEventData baseEventData)
|
||||
|
||||
@@ -497,10 +497,12 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
{
|
||||
singleUIManager.StartRide();
|
||||
transform.Find("UI/Panel(Clone)/ToolBarPanel/StartOrPauseButton").GetComponent<Button>().enabled = true;
|
||||
transform.Find("UI/Panel(Clone)/ToolBarPanel/SettingButton").GetComponent<Button>().enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
transform.Find("UI/Panel(Clone)/ToolBarPanel/StartOrPauseButton").GetComponent<Button>().enabled = false;
|
||||
transform.Find("UI/Panel(Clone)/ToolBarPanel/SettingButton").GetComponent<Button>().enabled = false;
|
||||
Utils.showToast(null, "Please connect the device!", duration: int.MaxValue, isLowest: true
|
||||
, stopFunc: () => !(!CheckAnt() && !isWatch)
|
||||
, endCallback: () =>
|
||||
@@ -508,6 +510,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
UIManager.Instance.DevicePanel.Close();
|
||||
singleUIManager.StartRide();
|
||||
transform.Find("UI/Panel(Clone)/ToolBarPanel/StartOrPauseButton").GetComponent<Button>().enabled = true;
|
||||
transform.Find("UI/Panel(Clone)/ToolBarPanel/SettingButton").GetComponent<Button>().enabled = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -646,7 +649,7 @@ public class CyclingController : DeviceServiceMonoBase
|
||||
#if UNITY_IOS || UNITY_ANDROID
|
||||
UIManager.ShowDevicePanel();
|
||||
#else
|
||||
UIManager.Show(UIManager.Instance.DevicePanel, pFUIPanel);
|
||||
UIManager.Show(UIManager.Instance.DevicePanel,null,true);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user