重置问题

This commit is contained in:
Caiyanpeng committed 2022-06-08 13:55:35 +08:00
1 parent c7afcbb01f
commit c333086e30
8 files changed
+3238 -1429

No files matched your search

@@ -459,6 +459,12 @@ public class RowerHomeScript : PFUIPanel
int truelyTime = 0;
private void StartFunc(object sender, EventArgs e)
{
if (UIManager.Instance.confirm!=null && UIManager.Instance.confirm.IsActive())
{
print("当前有弹窗");
return;
}
if (openTimer) return;
Id = Guid.NewGuid().ToString();
if (transform.parent.parent.Find("ModalPanel/RowerWelldone(Clone)") && transform.parent.parent.Find("ModalPanel/RowerWelldone(Clone)").gameObject.activeInHierarchy)
@@ -773,6 +779,7 @@ public class RowerHomeScript : PFUIPanel
{
#if UNITY_EDITOR
var a = tempList[(tempx++) % tempList.Count];
Debug.Log(a);
PaintPullCurve((ushort)(a / 10));
if (RowerData == null) return;
#endif
@@ -1152,12 +1159,11 @@ public class RowerHomeScript : PFUIPanel
//if (pullList.Count == 0)
if(pointCount == 0)
{
ClearChart("Player 2");
isPlay = true;
x = 0.1;
pointCount++;
pullList.Add(new DoubleVector2(x, y));
//SetChartData(pullList, historyPullList);
ClearChart();
SetChartData(x, y);
}
//else if (pullList.Count > 1)
@@ -1167,29 +1173,34 @@ public class RowerHomeScript : PFUIPanel
pointCount++;
pullList.Add(new DoubleVector2(x, y));
SetChartData(x, y);
//SetChartData(pullList, historyPullList);
historyPullList = pullList.Select(x => x).ToList();
pullList.Clear();
pointCount = 0;
//ClearChart();
x = 0.1;
SetChartData(x, y);
//SetChartData(x, y);
pointCount = 1;
isPlay = true;
//isPlay = true;
pullList.Add(new DoubleVector2(x, y));
}
else
{
//只有0并且两秒没拉,曲线消失
if (stopSeconds == 1)
if (stopSeconds == 1)
{
ClearChart();
ClearChart("Player 1");
ClearChart("Player 2");
//SetChartData(new List<DoubleVector2>(), new List<DoubleVector2>());
}
}
}
else
{
if (pullList.Count(x => x.y == 0) == pullList.Count)
{
ClearChart("Player 2");
pointCount = 0;
SetChartData(0.1, 0);
}
x += 0.1;
pointCount++;
pullList.Add(new DoubleVector2(x, y));
@@ -1216,10 +1227,10 @@ public class RowerHomeScript : PFUIPanel
// x += 0.1f;
//}
}
void ClearChart()
void ClearChart(string cateName)
{
rowerGraphChartFeed.ClearChart();
graphChartFeed.ClearChart();
rowerGraphChartFeed.ClearChart(cateName);
graphChartFeed.ClearChart(cateName);
}
double preX, preY;
void SetChartData(double x, double y)
@@ -1265,7 +1276,7 @@ public class RowerHomeScript : PFUIPanel
ShortUpdateData();
shortTimer += 0.25f;
}
if (openTimer && timer <= 0)
if (timer <= 0)
{
TimerTicks();
ticks++;
@@ -1331,9 +1342,8 @@ public class RowerHomeScript : PFUIPanel
transform.Find("Ready/Img").gameObject.SetActive(flag);
transform.Find("Ready/Text").gameObject.SetActive(flag);
transform.Find("Ready/DeviceStatusConnect").gameObject.SetActive(flag);
if (!isFirstReset && flag)
if (flag && RowerData.TotalDistance != 0)
{
isFirstReset = true;
Rower.Reset();
//RowerData.Reset();
}