继续骑行海图初始位置,地图属性调整
This commit is contained in:
1 parent
724e43f392
commit
3757ae6e6c
10 files changed
+3279
-3274
No files matched your search
@@ -44,6 +44,22 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
return index - graph.HorizontalScrolling >= graph.DataSource.HorizontalViewSize / 2;
|
||||
}
|
||||
|
||||
public void InitHorizontalScrolling(int index)
|
||||
{
|
||||
var halfView = graph.DataSource.HorizontalViewSize / 2;
|
||||
if (index >= halfView)
|
||||
{
|
||||
if (index + halfView >= mData.Count)
|
||||
{
|
||||
graph.HorizontalScrolling = mData.Count - graph.DataSource.HorizontalViewSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
graph.HorizontalScrolling = index - halfView;
|
||||
}
|
||||
}
|
||||
}
|
||||
bool VerifySorted(List<DoubleVector2> data)
|
||||
{
|
||||
if (data == null)
|
||||
|
||||
Reference in new issue
Block a user