曲线调整
This commit is contained in:
1 parent
f47f5c9ff6
commit
3c4ecf3e83
8 files changed
+2279
-1977
No files matched your search
@@ -89,7 +89,7 @@ public class RowerHomeScript : PFUIPanel
|
||||
GameObject btnStart;
|
||||
Transform left, bottom, mid;
|
||||
float timer = 1.0f;
|
||||
List<DoubleVector2> pullList = new List<DoubleVector2>();
|
||||
List<DoubleVector2> pullList = new List<DoubleVector2>(), historyPullList = new List<DoubleVector2>();
|
||||
public Dictionary<object, Sprite> spriteDict,spriteDict2;
|
||||
List<string> records;
|
||||
List<TempRowerCalc> values;
|
||||
@@ -597,6 +597,7 @@ public class RowerHomeScript : PFUIPanel
|
||||
left.Find("Calories/Value").GetComponent<Text>().text = "---";
|
||||
|
||||
pullList = new List<DoubleVector2>();
|
||||
historyPullList = new List<DoubleVector2>();
|
||||
mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
||||
openTimer = false;
|
||||
if (rowerType.type == 0)
|
||||
@@ -698,14 +699,16 @@ public class RowerHomeScript : PFUIPanel
|
||||
#if UNITY_EDITOR
|
||||
List<ushort> tempList = new List<ushort>()
|
||||
{
|
||||
0,1230,4,500,12,13,16,0,0,0,20,30,40,50,60,500
|
||||
0,300,200,1100,400,500,120,130,160,0,0,0,200,300,400,500,600,500
|
||||
};
|
||||
int tempx = 0;
|
||||
#endif
|
||||
void TimerTicks()
|
||||
{
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
PaintPullCurve(tempList[(tempx++) % tempList.Count]);
|
||||
var a = tempList[(tempx++) % tempList.Count];
|
||||
PaintPullCurve((ushort)(a / 10));
|
||||
if (RowerData == null) return;
|
||||
#endif
|
||||
#if !UNITY_EDITOR
|
||||
if (Rower == null)
|
||||
@@ -916,17 +919,18 @@ public class RowerHomeScript : PFUIPanel
|
||||
if (pullList.Count == 0)
|
||||
{
|
||||
isPlay = true;
|
||||
x = 0;
|
||||
x = 0.1;
|
||||
pullList.Add(new DoubleVector2(x, y));
|
||||
mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
||||
mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList, historyPullList);
|
||||
}
|
||||
else if (pullList.Count > 1)
|
||||
{
|
||||
x += 0.1;
|
||||
pullList.Add(new DoubleVector2(x, y));
|
||||
mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
||||
mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList, historyPullList);
|
||||
historyPullList = pullList.Select(x => x).ToList();
|
||||
pullList.Clear();
|
||||
x = 0;
|
||||
x = 0.1;
|
||||
isPlay = true;
|
||||
pullList.Add(new DoubleVector2(x, y));
|
||||
}
|
||||
@@ -935,7 +939,7 @@ public class RowerHomeScript : PFUIPanel
|
||||
//只有0并且两秒没拉,曲线消失
|
||||
if (stopSeconds == 1)
|
||||
{
|
||||
mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(new List<DoubleVector2>());
|
||||
mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(new List<DoubleVector2>(), new List<DoubleVector2>());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -949,7 +953,7 @@ public class RowerHomeScript : PFUIPanel
|
||||
isPlay = false;
|
||||
left.Find("Rower").GetComponent<RowerAnimation>().StartAnimation();
|
||||
}
|
||||
mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
||||
mid.Find("GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList, historyPullList);
|
||||
}
|
||||
//Debug.Log($"{x},{y}");
|
||||
//transform.Find("Mid/GraphChart").GetComponent<RowerGraphChartFeed>().SetData(pullList);
|
||||
@@ -967,7 +971,11 @@ public class RowerHomeScript : PFUIPanel
|
||||
float staticTimer = 1f,shortTimer = 0.1f;
|
||||
void Update()
|
||||
{
|
||||
if (openTimer)
|
||||
#if UNITY_EDITOR
|
||||
if (openTimer || true)
|
||||
#else
|
||||
if (openTimer)
|
||||
#endif
|
||||
{
|
||||
timer -= Time.deltaTime;
|
||||
if (timer <= 0)
|
||||
|
||||
Reference in new issue
Block a user