移动动效和界面调整
This commit is contained in:
1 parent
11fdcff7c3
commit
9ac7c86ca6
12 files changed
+4926
-3498
No files matched your search
@@ -24,6 +24,16 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
graph = GetComponent<GraphChartBase>();
|
||||
}
|
||||
|
||||
public bool isEnd(int index)
|
||||
{
|
||||
return index - start == 51;
|
||||
}
|
||||
|
||||
public bool isMid(int index)
|
||||
{
|
||||
return index - start == 26;
|
||||
}
|
||||
bool VerifySorted(List<DoubleVector2> data)
|
||||
{
|
||||
if (data == null)
|
||||
@@ -119,7 +129,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public int start, end;
|
||||
void LoadPage(double pagePosition)
|
||||
{
|
||||
if (graph != null)
|
||||
@@ -128,7 +138,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
Debug.Log("Loading page :" + pagePosition);
|
||||
graph.DataSource.StartBatch(); // call start batch
|
||||
graph.DataSource.HorizontalViewOrigin = 0;
|
||||
int start, end;
|
||||
|
||||
findPointsForPage(pagePosition, out start, out end); // get the page edges
|
||||
graph.DataSource.ClearCategory("Player 2"); // clear the cateogry
|
||||
|
||||
@@ -174,14 +184,15 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
public double pageStartThreshold;
|
||||
public double pageEndThreshold;
|
||||
public void Update()
|
||||
{
|
||||
if (graph != null)
|
||||
{
|
||||
//check the scrolling position of the graph. if we are past the view size , load a new page
|
||||
double pageStartThreshold = currentPagePosition - mCurrentPageSizeFactor;
|
||||
double pageEndThreshold = currentPagePosition + mCurrentPageSizeFactor - graph.DataSource.HorizontalViewSize;
|
||||
pageStartThreshold = currentPagePosition - mCurrentPageSizeFactor;
|
||||
pageEndThreshold = currentPagePosition + mCurrentPageSizeFactor - graph.DataSource.HorizontalViewSize;
|
||||
|
||||
if (graph.HorizontalScrolling < pageStartThreshold || graph.HorizontalScrolling > pageEndThreshold || currentZoom >= graph.DataSource.HorizontalViewSize * 2f)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user