5.9修改暂存
This commit is contained in:
parent
cfa1cc4f7b
commit
edc629ed75
@ -3,8 +3,8 @@
|
|||||||
allprojects {
|
allprojects {
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {**ARTIFACTORYREPOSITORY**
|
repositories {**ARTIFACTORYREPOSITORY**
|
||||||
google()
|
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||||
jcenter()
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@ -18,8 +18,8 @@ allprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {**ARTIFACTORYREPOSITORY**
|
repositories {**ARTIFACTORYREPOSITORY**
|
||||||
google()
|
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||||
jcenter()
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||||
maven {
|
maven {
|
||||||
url 'https://api.mapbox.com/downloads/v2/releases/maven'
|
url 'https://api.mapbox.com/downloads/v2/releases/maven'
|
||||||
authentication {
|
authentication {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -67,6 +67,7 @@ namespace Assets.Scripts.Apis.Models
|
|||||||
public string Cover { get; set; }
|
public string Cover { get; set; }
|
||||||
public int? Type { get; set; }
|
public int? Type { get; set; }
|
||||||
public double? TypeValue { get; set; }
|
public double? TypeValue { get; set; }
|
||||||
|
public double Ticks { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,6 +96,7 @@ namespace Assets.Scripts.Apis.Models
|
|||||||
public List<RowerChartModel> list { get; set; }
|
public List<RowerChartModel> list { get; set; }
|
||||||
public string Country { get; set; }
|
public string Country { get; set; }
|
||||||
public int Nid { get; set; }
|
public int Nid { get; set; }
|
||||||
|
public double Ticks { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Info
|
public class Info
|
||||||
|
|||||||
@ -21,7 +21,7 @@ public delegate void ChangeLanguageDelegate();
|
|||||||
|
|
||||||
public static class App
|
public static class App
|
||||||
{
|
{
|
||||||
public static string Host = "http://192.168.0.101:5083/";
|
public static string Host = "http://192.168.0.101:5087/";
|
||||||
|
|
||||||
public static string AppVersion = Application.version;
|
public static string AppVersion = Application.version;
|
||||||
|
|
||||||
@ -223,17 +223,17 @@ public static class App
|
|||||||
InitLanguage();
|
InitLanguage();
|
||||||
#if !UNITY_EDITOR
|
#if !UNITY_EDITOR
|
||||||
//测试服务器 Host = "http://192.168.0.101:5083/";
|
//测试服务器 Host = "http://192.168.0.101:5083/";
|
||||||
//Host = "http://pf.juze.pro/";
|
Host = "http://pf.juze.pro/";
|
||||||
//UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
||||||
//TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
|
TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
|
||||||
//线上
|
//线上
|
||||||
//Host = "https://wx.powerfun.com.cn/";
|
//Host = "https://wx.powerfun.com.cn/";
|
||||||
//UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11000);
|
//UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11000);
|
||||||
//TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11001);
|
//TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 11001);
|
||||||
//本地
|
//本地
|
||||||
Host = "http://192.168.0.101:5087/";
|
//Host = "http://192.168.0.101:5087/";
|
||||||
UdpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11000);
|
//UdpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.97"), 11000);
|
||||||
TcpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001);
|
//TcpAddress = new IPEndPoint(IPAddress.Parse("192.168.0.102"), 21001);
|
||||||
Debug.unityLogger.logEnabled = false;
|
Debug.unityLogger.logEnabled = false;
|
||||||
#else
|
#else
|
||||||
//Host = "http://pf.juze.pro/";
|
//Host = "http://pf.juze.pro/";
|
||||||
|
|||||||
@ -55,7 +55,7 @@ namespace Assets.Scripts.Devices.Ble.Characteristic
|
|||||||
public static RowerTaskPanel.RowerType rowerType { get; private set; }
|
public static RowerTaskPanel.RowerType rowerType { get; private set; }
|
||||||
public void HandleAttributeReceived(byte[] data)
|
public void HandleAttributeReceived(byte[] data)
|
||||||
{
|
{
|
||||||
//Debug.Log("数据" + string.Join(",", data));
|
Debug.Log("数据" + string.Join(",", data));
|
||||||
if (data[0] == 53)
|
if (data[0] == 53)
|
||||||
{
|
{
|
||||||
PeakDriveForce = LbsToNewton(Convert.ToDouble(BitConvertHelper.ToUInt16(data, 13)) / 10,true);
|
PeakDriveForce = LbsToNewton(Convert.ToDouble(BitConvertHelper.ToUInt16(data, 13)) / 10,true);
|
||||||
|
|||||||
@ -44,6 +44,10 @@ namespace Assets.Scripts.Ble
|
|||||||
(byte) 24,
|
(byte) 24,
|
||||||
(byte) 38
|
(byte) 38
|
||||||
};
|
};
|
||||||
|
public static readonly byte[] C2Rower = new byte[]
|
||||||
|
{
|
||||||
|
(byte)206,(byte)6
|
||||||
|
};
|
||||||
public static readonly byte[] KineticInRide = new byte[16]
|
public static readonly byte[] KineticInRide = new byte[16]
|
||||||
{
|
{
|
||||||
(byte) 233,
|
(byte) 233,
|
||||||
@ -164,6 +168,7 @@ namespace Assets.Scripts.Ble
|
|||||||
new ServiceUuid(new Guid("6e40fec1-b5a3-f393-e0a9-e50e24dcca9e"), ServiceUuids.TacxBle, true),
|
new ServiceUuid(new Guid("6e40fec1-b5a3-f393-e0a9-e50e24dcca9e"), ServiceUuids.TacxBle, true),
|
||||||
new ServiceUuid(new Guid("01007b34-3576-8b40-8918-8ff3949ce592"), ServiceUuids.Elite, true),
|
new ServiceUuid(new Guid("01007b34-3576-8b40-8918-8ff3949ce592"), ServiceUuids.Elite, true),
|
||||||
new ServiceUuid(new Guid("3a01f4c0-37a8-6541-bab9-654ef70747c6"), ServiceUuids.PowerBeam, true),
|
new ServiceUuid(new Guid("3a01f4c0-37a8-6541-bab9-654ef70747c6"), ServiceUuids.PowerBeam, true),
|
||||||
|
//new ServiceUuid(new Guid("CE060000-43E5-11E4-916C-0800200C9A66"), ServiceUuids.C2Rower,true),
|
||||||
};
|
};
|
||||||
public static readonly IReadOnlyList<ServiceUuid> CyclingServices = ServiceUuids.Services.Where(s => s.IsCycling).ToList();
|
public static readonly IReadOnlyList<ServiceUuid> CyclingServices = ServiceUuids.Services.Where(s => s.IsCycling).ToList();
|
||||||
|
|
||||||
|
|||||||
@ -135,7 +135,7 @@ namespace Assets.Scripts.Ble
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//Debug.Log($"設備{App.IsRowerMode}信息,{item.IdGuid},{string.Join(";", item.IdByteArray)}");
|
//Debug.Log($"設備{App.IsRowerMode}信息,{item.IdGuid},{string.Join(";", item.IdByteArray)}");
|
||||||
if (item.IdByteArray == ServiceUuids.Ftms)
|
if (item.IdByteArray == ServiceUuids.Ftms || item.IdByteArray == ServiceUuids.C2Rower)
|
||||||
{
|
{
|
||||||
sensor = SensorType.Rower;
|
sensor = SensorType.Rower;
|
||||||
//else
|
//else
|
||||||
|
|||||||
@ -297,7 +297,9 @@ public class MainController : BaseScene
|
|||||||
// UIManager.ShowHomePanel();
|
// UIManager.ShowHomePanel();
|
||||||
//});
|
//});
|
||||||
#if UNITY_ANDROID || UNITY_IOS
|
#if UNITY_ANDROID || UNITY_IOS
|
||||||
|
//隐藏骑行
|
||||||
|
UIManager.ShowRowerPanel();
|
||||||
|
return;
|
||||||
if (!App.IsRowerMode.HasValue)
|
if (!App.IsRowerMode.HasValue)
|
||||||
{
|
{
|
||||||
UIManager.ShowHomePanel();
|
UIManager.ShowHomePanel();
|
||||||
|
|||||||
@ -87,7 +87,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
GameObject btnStart;
|
GameObject btnStart;
|
||||||
Transform left, bottom, mid;
|
Transform left, bottom, mid,rmydata;
|
||||||
float timer = 1.0f;
|
float timer = 1.0f;
|
||||||
List<DoubleVector2> pullList = new List<DoubleVector2>(), historyPullList = new List<DoubleVector2>();
|
List<DoubleVector2> pullList = new List<DoubleVector2>(), historyPullList = new List<DoubleVector2>();
|
||||||
public Dictionary<object, Sprite> spriteDict,spriteDict2;
|
public Dictionary<object, Sprite> spriteDict,spriteDict2;
|
||||||
@ -163,6 +163,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
left = transform.Find("Rower/Modes/Scroll/M1/Left");
|
left = transform.Find("Rower/Modes/Scroll/M1/Left");
|
||||||
bottom = transform.Find("Rower/Bottom");
|
bottom = transform.Find("Rower/Bottom");
|
||||||
mid = transform.Find("Rower/Modes/Scroll/M1/Mid");
|
mid = transform.Find("Rower/Modes/Scroll/M1/Mid");
|
||||||
|
rmydata = transform.Find("Rower/Modes/Scroll/M2/MyData");
|
||||||
slider = transform.Find("ResBar/PFUISlider");
|
slider = transform.Find("ResBar/PFUISlider");
|
||||||
UIManager.AddEvent(transform.Find("ResBar/BtnAdd").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
UIManager.AddEvent(transform.Find("ResBar/BtnAdd").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||||
{
|
{
|
||||||
@ -210,7 +211,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
{
|
{
|
||||||
//UIManager.ShowRowerWelldone("33171855-66FC-4121-935C-0F4DA98E5BB2", Init);
|
//UIManager.ShowRowerWelldone("33171855-66FC-4121-935C-0F4DA98E5BB2", Init);
|
||||||
//return;
|
//return;
|
||||||
//UIManager.ShowRowerWelldone("2B6E8414-AF47-4B49-99E9-A89B83C65305", Init);
|
//UIManager.ShowRowerWelldone("1915400E-A6E5-4FB7-B371-7240BEA20A54", Init);
|
||||||
//return;
|
//return;
|
||||||
if (checkRowing()) return;
|
if (checkRowing()) return;
|
||||||
if (C2RowerData.IsEnabled == true && C2RowerData.rowerType != null) return;
|
if (C2RowerData.IsEnabled == true && C2RowerData.rowerType != null) return;
|
||||||
@ -229,7 +230,8 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
{
|
{
|
||||||
ReturnHome();
|
ReturnHome();
|
||||||
}, false);
|
}, false);
|
||||||
nav.SetButtonActive(new List<int> { 3, 7 }, null, c1, null, c3, false);
|
//隐藏骑行
|
||||||
|
nav.SetButtonActive(new List<int> { 3, 7 }, null, c1, null, null, false);
|
||||||
newNav = nav;
|
newNav = nav;
|
||||||
#endif
|
#endif
|
||||||
UIManager.AddEvent(transform.Find("Stopped/Confirm/BtnSave").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
UIManager.AddEvent(transform.Find("Stopped/Confirm/BtnSave").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||||
@ -470,7 +472,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
startTime = UIManager.Now.GetDateTime();
|
startTime = UIManager.Now.GetDateTime();
|
||||||
createTime = null;
|
createTime = null;
|
||||||
truelyTime = 0;
|
truelyTime = 0;
|
||||||
TimerTicks();
|
//TimerTicks();
|
||||||
openTimer = true;
|
openTimer = true;
|
||||||
timer = 1.0f;
|
timer = 1.0f;
|
||||||
}
|
}
|
||||||
@ -599,10 +601,11 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
left.Find("RightImage/Value").GetComponent<Image>().fillAmount = 0;
|
left.Find("RightImage/Value").GetComponent<Image>().fillAmount = 0;
|
||||||
left.Find("Times/Value").GetComponent<Text>().text = "---";
|
left.Find("Times/Value").GetComponent<Text>().text = "---";
|
||||||
left.Find("Calories/Value").GetComponent<Text>().text = "---";
|
left.Find("Calories/Value").GetComponent<Text>().text = "---";
|
||||||
|
rmydata.Find("Calories/Value").GetComponent<Text>().text = "---";
|
||||||
pullList = new List<DoubleVector2>();
|
pullList = new List<DoubleVector2>();
|
||||||
historyPullList = new List<DoubleVector2>();
|
historyPullList = new List<DoubleVector2>();
|
||||||
mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
SetChartData(pullList, historyPullList);
|
||||||
|
//mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
||||||
openTimer = false;
|
openTimer = false;
|
||||||
if (rowerType.type == 0)
|
if (rowerType.type == 0)
|
||||||
{
|
{
|
||||||
@ -624,6 +627,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
}
|
}
|
||||||
|
|
||||||
mid.Find("W/Value").GetComponent<Text>().text = "---";
|
mid.Find("W/Value").GetComponent<Text>().text = "---";
|
||||||
|
rmydata.Find("W/Value").GetComponent<Text>().text = "---";
|
||||||
bottom.Find("500/Value").GetComponent<Text>().text = "---";
|
bottom.Find("500/Value").GetComponent<Text>().text = "---";
|
||||||
bottom.Find("MS/Value").GetComponent<Text>().text = "---";
|
bottom.Find("MS/Value").GetComponent<Text>().text = "---";
|
||||||
//bottom.Find("MS/AvgValue").GetComponent<Text>().text = "---";
|
//bottom.Find("MS/AvgValue").GetComponent<Text>().text = "---";
|
||||||
@ -631,7 +635,9 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
bottom.Find("Expected/Value").GetComponent<Text>().text = "---";
|
bottom.Find("Expected/Value").GetComponent<Text>().text = "---";
|
||||||
bottom.Find("Expected/Title").GetComponent<Text>().text = bottom.Find("Expected/Title").GetComponent<Text>().text.Replace("EST",App.GetLocalString("EST"));
|
bottom.Find("Expected/Title").GetComponent<Text>().text = bottom.Find("Expected/Title").GetComponent<Text>().text.Replace("EST",App.GetLocalString("EST"));
|
||||||
mid.Find("AvgForce/Value").GetComponent<Text>().text = "---";
|
mid.Find("AvgForce/Value").GetComponent<Text>().text = "---";
|
||||||
|
rmydata.Find("AvgForce/Value").GetComponent<Text>().text = "---";
|
||||||
mid.Find("PeakForce/Value").GetComponent<Text>().text = "---";
|
mid.Find("PeakForce/Value").GetComponent<Text>().text = "---";
|
||||||
|
rmydata.Find("PeakForce/Value").GetComponent<Text>().text = "---";
|
||||||
records = new List<string>();
|
records = new List<string>();
|
||||||
values = new List<TempRowerCalc>();
|
values = new List<TempRowerCalc>();
|
||||||
Kj = 0;
|
Kj = 0;
|
||||||
@ -697,7 +703,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
bool openTimer = false;
|
public bool openTimer { get; private set; } = false;
|
||||||
double x = 0f;
|
double x = 0f;
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
@ -770,6 +776,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
bottom.Find("Time/Value").GetComponent<Text>().text = TimeSpan.FromSeconds(++seconds).ToPFString();
|
bottom.Find("Time/Value").GetComponent<Text>().text = TimeSpan.FromSeconds(++seconds).ToPFString();
|
||||||
}
|
}
|
||||||
mid.Find("W/Value").GetComponent<Text>().text = "---";
|
mid.Find("W/Value").GetComponent<Text>().text = "---";
|
||||||
|
rmydata.Find("W/Value").GetComponent<Text>().text = "---";
|
||||||
bottom.Find("500/Value").GetComponent<Text>().text = "---";
|
bottom.Find("500/Value").GetComponent<Text>().text = "---";
|
||||||
bottom.Find("MS/Value").GetComponent<Text>().text = "---";
|
bottom.Find("MS/Value").GetComponent<Text>().text = "---";
|
||||||
bottom.Find("Expected/Value").GetComponent<Text>().text = "---";
|
bottom.Find("Expected/Value").GetComponent<Text>().text = "---";
|
||||||
@ -786,13 +793,16 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
|
|
||||||
|
|
||||||
mid.Find("W/Value").GetComponent<Text>().text = power.ToString();
|
mid.Find("W/Value").GetComponent<Text>().text = power.ToString();
|
||||||
|
rmydata.Find("W/Value").GetComponent<Text>().text = power.ToString();
|
||||||
bottom.Find("500/Value").GetComponent<Text>().text = TimeSpan.FromSeconds(pace).ToPFString();
|
bottom.Find("500/Value").GetComponent<Text>().text = TimeSpan.FromSeconds(pace).ToPFString();
|
||||||
bottom.Find("MS/Value").GetComponent<Text>().text = rate.ToString();
|
bottom.Find("MS/Value").GetComponent<Text>().text = rate.ToString();
|
||||||
left.Find("Times/Value").GetComponent<Text>().text = strokeCount.ToString();
|
left.Find("Times/Value").GetComponent<Text>().text = strokeCount.ToString();
|
||||||
left.Find("Calories/Value").GetComponent<Text>().text = energy.ToString();
|
left.Find("Calories/Value").GetComponent<Text>().text = energy.ToString();
|
||||||
|
rmydata.Find("Calories/Value").GetComponent<Text>().text = energy.ToString();
|
||||||
mid.Find("AvgForce/Value").GetComponent<Text>().text = RowerCommonDataInstance.AverageDriveForce.ToString("#0");
|
mid.Find("AvgForce/Value").GetComponent<Text>().text = RowerCommonDataInstance.AverageDriveForce.ToString("#0");
|
||||||
|
rmydata.Find("AvgForce/Value").GetComponent<Text>().text = RowerCommonDataInstance.AverageDriveForce.ToString("#0");
|
||||||
mid.Find("PeakForce/Value").GetComponent<Text>().text = RowerCommonDataInstance.PeakDriveForce.ToString("#0");
|
mid.Find("PeakForce/Value").GetComponent<Text>().text = RowerCommonDataInstance.PeakDriveForce.ToString("#0");
|
||||||
|
rmydata.Find("PeakForce/Value").GetComponent<Text>().text = RowerCommonDataInstance.PeakDriveForce.ToString("#0");
|
||||||
if (pace != 0)
|
if (pace != 0)
|
||||||
{
|
{
|
||||||
if (rowerType.type == 1)
|
if (rowerType.type == 1)
|
||||||
@ -926,13 +936,13 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
isPlay = true;
|
isPlay = true;
|
||||||
x = 0.1;
|
x = 0.1;
|
||||||
pullList.Add(new DoubleVector2(x, y));
|
pullList.Add(new DoubleVector2(x, y));
|
||||||
mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList, historyPullList);
|
SetChartData(pullList, historyPullList);
|
||||||
}
|
}
|
||||||
else if (pullList.Count > 1)
|
else if (pullList.Count > 1)
|
||||||
{
|
{
|
||||||
x += 0.1;
|
x += 0.1;
|
||||||
pullList.Add(new DoubleVector2(x, y));
|
pullList.Add(new DoubleVector2(x, y));
|
||||||
mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList, historyPullList);
|
SetChartData(pullList, historyPullList);
|
||||||
historyPullList = pullList.Select(x => x).ToList();
|
historyPullList = pullList.Select(x => x).ToList();
|
||||||
pullList.Clear();
|
pullList.Clear();
|
||||||
x = 0.1;
|
x = 0.1;
|
||||||
@ -944,7 +954,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
//只有0并且两秒没拉,曲线消失
|
//只有0并且两秒没拉,曲线消失
|
||||||
if (stopSeconds == 1)
|
if (stopSeconds == 1)
|
||||||
{
|
{
|
||||||
mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(new List<DoubleVector2>(), new List<DoubleVector2>());
|
SetChartData(new List<DoubleVector2>(), new List<DoubleVector2>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -958,7 +968,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
isPlay = false;
|
isPlay = false;
|
||||||
left.Find("Rower").GetComponent<RowerAnimation>().StartAnimation();
|
left.Find("Rower").GetComponent<RowerAnimation>().StartAnimation();
|
||||||
}
|
}
|
||||||
mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList, historyPullList);
|
SetChartData(pullList, historyPullList);
|
||||||
}
|
}
|
||||||
//Debug.Log($"{x},{y}");
|
//Debug.Log($"{x},{y}");
|
||||||
//transform.Find("Mid/GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
//transform.Find("Mid/GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
||||||
@ -973,7 +983,12 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
// x += 0.1f;
|
// x += 0.1f;
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
float staticTimer = 1f,shortTimer = 0.1f;
|
void SetChartData(List<DoubleVector2> v1, List<DoubleVector2> v2)
|
||||||
|
{
|
||||||
|
mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(v1,v2);
|
||||||
|
transform.Find("Rower/Modes/Scroll/M2/MyData/GraphChart").GetComponent<RowerGraphChartFeed>().SetData(v1);
|
||||||
|
}
|
||||||
|
float staticTimer = 1f,shortTimer = 0.25f;
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
@ -983,7 +998,13 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
timer -= Time.deltaTime;
|
timer -= Time.deltaTime;
|
||||||
if (timer <= 0)
|
shortTimer -= Time.deltaTime;
|
||||||
|
if (shortTimer <= 0)
|
||||||
|
{
|
||||||
|
ShortUpdateData();
|
||||||
|
shortTimer += 0.25f;
|
||||||
|
}
|
||||||
|
if (openTimer && timer <= 0)
|
||||||
{
|
{
|
||||||
TimerTicks();
|
TimerTicks();
|
||||||
timer = 1f + timer;
|
timer = 1f + timer;
|
||||||
@ -997,15 +1018,15 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
staticTimer += 1f;
|
staticTimer += 1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
shortTimer -= Time.deltaTime;
|
//shortTimer -= Time.deltaTime;
|
||||||
if (shortTimer <= 0)
|
//if (shortTimer <= 0)
|
||||||
{
|
//{
|
||||||
if (openTimer)
|
// if (openTimer)
|
||||||
{
|
// {
|
||||||
ShortUpdateData();
|
// ShortUpdateData();
|
||||||
}
|
// }
|
||||||
shortTimer += 0.1f;
|
// shortTimer += 0.5f;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShortUpdateData()
|
void ShortUpdateData()
|
||||||
@ -1034,6 +1055,7 @@ public class RowerHomeScript : PFUIPanel
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mid.Find("W/Value").GetComponent<Text>().text = power.ToString();
|
mid.Find("W/Value").GetComponent<Text>().text = power.ToString();
|
||||||
|
rmydata.Find("W/Value").GetComponent<Text>().text = power.ToString();
|
||||||
bottom.Find("500/Value").GetComponent<Text>().text = TimeSpan.FromSeconds(pace).ToPFString();
|
bottom.Find("500/Value").GetComponent<Text>().text = TimeSpan.FromSeconds(pace).ToPFString();
|
||||||
bottom.Find("MS/Value").GetComponent<Text>().text = rate.ToString();
|
bottom.Find("MS/Value").GetComponent<Text>().text = rate.ToString();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,7 +91,7 @@ public class RouteItem : MonoBehaviour
|
|||||||
{
|
{
|
||||||
Utils.DisplayImage(raw, result.Cover, true);
|
Utils.DisplayImage(raw, result.Cover, true);
|
||||||
}
|
}
|
||||||
row1.Find("Time").GetComponent<Text>().text = $"<color=#5c5c6e>{App.GetLocalString("Rowing time")}:</color>{TimeSpan.FromSeconds(result.TotalTime).ToString()}";
|
row1.Find("Time").GetComponent<Text>().text = $"<color=#5c5c6e>{App.GetLocalString("Rowing time")}:</color>{TimeSpan.FromSeconds(result.Ticks).ToString()}";
|
||||||
row1.Find("Distance").GetComponent<Text>().text = $"<color=#5c5c6e>{App.GetLocalString("row distance")}:</color>{result.TotalDistance}M";
|
row1.Find("Distance").GetComponent<Text>().text = $"<color=#5c5c6e>{App.GetLocalString("row distance")}:</color>{result.TotalDistance}M";
|
||||||
row2.Find("Device").GetComponent<Text>().text = $"<color=#5c5c6e>{App.GetLocalString("Rowing equipment")}:</color>{result.ManufacturerName}";
|
row2.Find("Device").GetComponent<Text>().text = $"<color=#5c5c6e>{App.GetLocalString("Rowing equipment")}:</color>{result.ManufacturerName}";
|
||||||
left.Find("Progress").gameObject.SetActive(false);
|
left.Find("Progress").gameObject.SetActive(false);
|
||||||
|
|||||||
@ -99,7 +99,7 @@ public class RowerMultiModeScript : MonoBehaviour
|
|||||||
// m2.Find("Track/T4").localPosition.y,
|
// m2.Find("Track/T4").localPosition.y,
|
||||||
// m2.Find("Track/T5").localPosition.y,
|
// m2.Find("Track/T5").localPosition.y,
|
||||||
//};
|
//};
|
||||||
scrollRank = transform.Find("Rower/Modes/Scroll/M2/Rank/Scroll View").GetComponent<ScrollRect>();
|
scrollRank = transform.Find("Rower/Modes/Scroll/M1/Rank/Scroll View").GetComponent<ScrollRect>();
|
||||||
var countryJson = Resources.Load<TextAsset>("UI/flags-mini").text;
|
var countryJson = Resources.Load<TextAsset>("UI/flags-mini").text;
|
||||||
countryList = JsonConvert.DeserializeObject<List<CountryModel>>(countryJson);
|
countryList = JsonConvert.DeserializeObject<List<CountryModel>>(countryJson);
|
||||||
}
|
}
|
||||||
@ -268,7 +268,7 @@ public class RowerMultiModeScript : MonoBehaviour
|
|||||||
}
|
}
|
||||||
t.Find("Left/NickName").GetComponent<Text>().text = data.NickName;
|
t.Find("Left/NickName").GetComponent<Text>().text = data.NickName;
|
||||||
|
|
||||||
if (data.list.Count == 0)
|
if (data.list.Count == 0 || !GetComponent<RowerHomeScript>().openTimer)
|
||||||
{
|
{
|
||||||
t.Find("Left/Time").GetComponent<Text>().text = TimeSpan.FromSeconds(0).ToString(@"mm\:ss");
|
t.Find("Left/Time").GetComponent<Text>().text = TimeSpan.FromSeconds(0).ToString(@"mm\:ss");
|
||||||
}
|
}
|
||||||
@ -971,7 +971,7 @@ public class RowerMultiModeScript : MonoBehaviour
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
transform.Find("Rower/Modes/Scroll/M2/Rank/MyRank").GetComponent<Text>().text = $"<color=#f93086>{userList.FindIndex(x => x.isMine) + 1}</color> / {userList.Count}";
|
transform.Find("Rower/Modes/Scroll/M1/Rank/MyRank").GetComponent<Text>().text = $"<color=#f93086>{userList.FindIndex(x => x.isMine) + 1}</color> / {userList.Count}";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0 单人 1 影子
|
// 0 单人 1 影子
|
||||||
@ -1173,7 +1173,7 @@ public class RowerMultiModeScript : MonoBehaviour
|
|||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
//return;
|
return;
|
||||||
timer -= Time.deltaTime;
|
timer -= Time.deltaTime;
|
||||||
if (timer < 0)
|
if (timer < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -120,7 +120,7 @@ public class RowerWelldone : PFUIPanel
|
|||||||
game.transform.Find("Content/Rank").GetComponent<Text>().text = (i + 1).ToString("00");
|
game.transform.Find("Content/Rank").GetComponent<Text>().text = (i + 1).ToString("00");
|
||||||
game.transform.Find("Content/NickName").GetComponent<Text>().text = item.NickName;
|
game.transform.Find("Content/NickName").GetComponent<Text>().text = item.NickName;
|
||||||
Utils.DisplayImageTempDict(game.transform.Find("Content/Avatar").GetComponent<RawImage>(), item.WxHeadImg, caches);
|
Utils.DisplayImageTempDict(game.transform.Find("Content/Avatar").GetComponent<RawImage>(), item.WxHeadImg, caches);
|
||||||
game.transform.Find("Content/Time").GetComponent<Text>().text = data.info.Type == 1 ? TimeSpan.FromSeconds(item.Time).ToString(@"hh\:mm\:ss") : item.TotalDistance.ToString("#0M");
|
game.transform.Find("Content/Time").GetComponent<Text>().text = data.info.Type == 1 ? TimeSpan.FromSeconds(item.Ticks).ToString(@"hh\:mm\:ss") : item.TotalDistance.ToString("#0M");
|
||||||
game.transform.SetParent(rankContent);
|
game.transform.SetParent(rankContent);
|
||||||
game.transform.localScale = Vector3.one;
|
game.transform.localScale = Vector3.one;
|
||||||
game.SetActive(true);
|
game.SetActive(true);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user