划船机保存前读秒
This commit is contained in:
1 parent
eb21914fb7
commit
b9aa0131cc
5 files changed
+4348
-4324
No files matched your search
@@ -179,7 +179,7 @@ public class RowerHomeScript : PFUIPanel
|
||||
#if !UNITY_EDITOR
|
||||
if (RowerData == null)
|
||||
{
|
||||
Utils.showToast(null, "Please connect the device!");
|
||||
Utils.showToast(null, "Please connect the device!", isLowest: true);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -343,7 +343,7 @@ public class RowerHomeScript : PFUIPanel
|
||||
{
|
||||
if (seconds > 0)
|
||||
{
|
||||
Utils.showToast(null, "Please end this training.");
|
||||
Utils.showToast(null, "Please end this training.", isLowest: true);
|
||||
return;
|
||||
}
|
||||
Disconnect();
|
||||
@@ -357,18 +357,20 @@ public class RowerHomeScript : PFUIPanel
|
||||
|
||||
//List<ushort> tempList = new List<ushort>()
|
||||
//{
|
||||
// 0,1,4,500,12,13,16,0,0,0,20,30,40,50,60,500
|
||||
// 0,1230,4,500,12,13,16,0,0,0,20,30,40,50,60,500
|
||||
//};
|
||||
//int tempx = 0;
|
||||
void TimerTicks()
|
||||
{
|
||||
//Debug.Log(123);
|
||||
//PaintPullCurve(tempList[(tempx++) % tempList.Count]);
|
||||
if (Rower == null)
|
||||
#if !UNITY_EDITOR
|
||||
if (Rower == null)
|
||||
{
|
||||
HandleDiscardDirect();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (RowerData == null) return;
|
||||
var heartRate = HeartRate ?? 0;
|
||||
bottom.Find("BPM/Value").GetComponent<Text>().text = heartRate.ToString();
|
||||
@@ -387,16 +389,16 @@ public class RowerHomeScript : PFUIPanel
|
||||
HandleSaveDirect();
|
||||
return;
|
||||
}
|
||||
else if (stopSeconds == 86)
|
||||
else if (stopSeconds == 81)
|
||||
{
|
||||
Utils.showToast(null, "Record will be saved!", duration: 5, stopFunc: () => stopSeconds < 6, isLowest: true);
|
||||
Utils.showToast(null, "Record will be saved!", duration: 10, stopFunc: () => stopSeconds < 6, isLowest: true,showSeconds:true);
|
||||
return;
|
||||
}
|
||||
else if (stopSeconds >= 6)
|
||||
{
|
||||
if (stopSeconds == 6)
|
||||
{
|
||||
Utils.showToast(null, "Please keep rowing...", duration: 10, stopFunc: () => stopSeconds < 6, isLowest: true);
|
||||
Utils.showToast(null, "Please keep rowing...", duration: 60, stopFunc: () => stopSeconds < 6, isLowest: true);
|
||||
}
|
||||
bottom.Find("Time/Value").GetComponent<Text>().text = TimeSpan.FromSeconds(seconds++).ToString();
|
||||
bottom.Find("W/Value").GetComponent<Text>().text = "---";
|
||||
@@ -450,12 +452,14 @@ public class RowerHomeScript : PFUIPanel
|
||||
void PaintPullCurve(ushort y)
|
||||
{
|
||||
Debug.Log("收到拉力" + y);
|
||||
#if !UNITY_EDITOR
|
||||
if (!openTimer)
|
||||
{
|
||||
RowerData.PullChanged -= PaintPullCurveDelegate;
|
||||
return;
|
||||
}
|
||||
if (y > 1200) y = 1200;
|
||||
#endif
|
||||
//if (y > 1200) y = 1200;
|
||||
//拉力条
|
||||
var rate = ((float)y) * 2 / 1200;
|
||||
if (rate > 1) rate = 1f;
|
||||
|
||||
Reference in new issue
Block a user