解决累计爬升不准问题&本地文件记录样式

This commit is contained in:
lishuo committed 2021-09-09 16:29:22 +08:00
1 parent 8a4657c11c
commit ee1114e2cf
45 files changed
+6924 -405

No files matched your search

@@ -197,7 +197,10 @@ public class ConnectDeviceModal : PFUIPanel
UIManager.AddEvent(deviceItemObj.gameObject, EventTriggerType.PointerClick, new UnityEngine.Events.UnityAction<BaseEventData>(e =>
{
deviceItemObj.Set(true);
if (deviceItemObj.DeviceInfo.Sensor != SensorType.Trainer && SensorType != SensorType.Trainer && deviceItemObj.DeviceInfo.State == DeviceState.Connected)
var trainer = SensorType == SensorType.Trainer && deviceItemObj.DeviceInfo.State == DeviceState.Connected;
var nontrainer = deviceItemObj.DeviceInfo.Sensor != SensorType.Trainer && SensorType != SensorType.Trainer && deviceItemObj.DeviceInfo.State == DeviceState.Connected;
if (trainer || nontrainer)
{
connectBtnText.text = "DISCONNECT";
}
@@ -205,6 +208,7 @@ public class ConnectDeviceModal : PFUIPanel
{
connectBtnText.text = "CONNECT";
}
foreach (var item in deviceList)
{
if (item.Key != deviceItemObj.DeviceInfo.Id)
@@ -232,14 +236,17 @@ public class ConnectDeviceModal : PFUIPanel
if (firstDevice != null)
{
firstDevice.Set(true);
if (firstDevice.DeviceInfo.Sensor != SensorType.Trainer && SensorType != SensorType.Trainer && firstDevice.DeviceInfo.State == DeviceState.Connected)
var trainer = SensorType == SensorType.Trainer && firstDevice.DeviceInfo.State == DeviceState.Connected;
var nontrainer = firstDevice.DeviceInfo.Sensor != SensorType.Trainer && SensorType != SensorType.Trainer && firstDevice.DeviceInfo.State == DeviceState.Connected;
if(trainer || nontrainer)
{
connectBtnText.text = "DISCONNECT";
}
else
{
connectBtnText.text = "CONNECT";
}
}
//connectBtn.text.text = "DISCOUNECT";
noDevice.text = firstDevice.DeviceInfo.Name;
}
@@ -37,12 +37,12 @@ public class LocalRouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterH
{
this.path = path;
this.index = index;
var Name = transform.Find("Left/Main/Name").GetComponent<Text>();
var Time = transform.Find("Left/Main/Time").GetComponent<Text>();
var RidingTime = transform.Find("Left/Main/Row1/Time").GetComponent<Text>();
var RidingDistance = transform.Find("Left/Main/Row1/Distance").GetComponent<Text>();
var Device = transform.Find("Left/Main/Row2/Device").GetComponent<Text>();
var recordImage = transform.Find("CoverImage").GetComponent<RawImage>();
var Name = transform.Find("BigLeft/Left/Main/Name").GetComponent<Text>();
var Time = transform.Find("BigLeft/Left/Main/Time").GetComponent<Text>();
var RidingTime = transform.Find("BigLeft/Left/Main/Row1/Time").GetComponent<Text>();
var RidingDistance = transform.Find("BigLeft/Left/Main/Row1/Distance").GetComponent<Text>();
var Device = transform.Find("BigLeft/Left/Main/Row2/Device").GetComponent<Text>();
var recordImage = transform.Find("BigLeft/CoverImage").GetComponent<RawImage>();
var uploadBtn = transform.Find("Right/BtnContinue").GetComponent<Button>();
var deleteBtn = transform.Find("Right/BtnDelete").GetComponent<Button>();
UIManager.AddEvent(uploadBtn.gameObject, EventTriggerType.PointerClick, (b) => GoUplaod());
@@ -89,6 +89,8 @@ public class LocalRouteItem : MonoBehaviour, IPointerExitHandler, IPointerEnterH
}
}
}
void GoUplaod()
{
UIManager.ShowConfirm("Upload", "Upload the local record?", () =>
@@ -29,8 +29,10 @@ public class ResultListController : PFUIPanel
void Awake()
{
//ApiBase.SetCookie("73385F5F719B610D132C1ECF3E9143272BF15214D57ED91CD7A9DFD832407471535112AAEB8E9271F75D54FBBF2D99F18FA313C1EEA5676F5D722D7FBB07C926BEC5905591BF9AFDDC6336552DF273112C2DA1794E6FA2F465B11FECD2E82E52");
localRouteItem = Resources.Load<Transform>("UI/Prefab/ResultList/LocalRouteItem");
#if UNITY_ANDROID || UNITY_IOS
routeResult = Resources.Load<Transform>("UI/Prefab/ResultList/RouteItem-Mobile");
localRouteItem = Resources.Load<Transform>("UI/Prefab/ResultList/LocalRouteItem-Mobile");
#endif
InitialColor();
scroll = transform.Find("ListPanel").Find("Scroll").GetComponent<ScrollRect>();
@@ -43,7 +45,7 @@ public class ResultListController : PFUIPanel
matchScroll = scrollContent.Find("MatchList");
matchContent = matchScroll.Find("Viewport").Find("Content");
contents = new Transform[] { routeContent, matchContent};
localRouteItem = Resources.Load<Transform>("UI/Prefab/ResultList/LocalRouteItem");
if (btnMatch != null)
{
UIManager.AddEvent(btnMatch.gameObject, EventTriggerType.PointerClick, (b) =>