细节调整

This commit is contained in:
lishuo committed 2021-07-26 14:09:21 +08:00
1 parent ac59808915
commit 1f3485846f
14 files changed
+2617 -2537

No files matched your search

@@ -94,7 +94,7 @@ namespace Assets.Scenes.Ride.Scripts
}
//显示观众
var watchList = mainController.GetWatcherList();
watchPanel.SetActive(watchList.Count >= 5);
watchPanel.SetActive(watchList.Count > 0);
#endregion
}
@@ -35,14 +35,16 @@ namespace Assets.Scenes.Ride.Scripts
}
}
private const int MAX_COUNT = 7;
private void CreateList()
{
var watchList = cyclingController.GetWatcherList();
var count = watchList.Count();
head.SetActive(count >= 5);
head.SetActive(count>= MAX_COUNT);
watchNum.text = count.ToString();//绑定观看人数
var list = watchList.Take(5);
var list = watchList.Take(MAX_COUNT);
Utils.DestroyChildren(content);
foreach (var item in list)
{
@@ -37,7 +37,19 @@ namespace Assets.Scenes.Ride.Scripts
var current = i * targetPoints;
if (current >= max)
{
return current - targetPoints > 0? current - targetPoints : 0;
current = current - targetPoints > 0? current - targetPoints : 0;
}
var ss = mData.Count - targetPoints;
var interval = currentIndex - current;
int mid = (int)(graph.DataSource.HorizontalViewSize / 2);
//是否到达中间及以后的位置
var isReachMid = interval >= mid;
//海拔图是否已经全部加载
var isReachEnd = currentIndex >= mData.Count - targetPoints && currentIndex <= mData.Count;
if (isReachMid && !isReachEnd)
{
current = current + interval- mid;
}
return current;
}