比赛海拔图位置&赛事无法开始问题
This commit is contained in:
parent
917cbbfb90
commit
06b102f0eb
@ -102,7 +102,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
miniMap.SetActive(false); //隐藏小地图
|
miniMap.SetActive(false); //隐藏小地图
|
||||||
//viewButton.gameObject.SetActive(false);//隐藏切换视角
|
//viewButton.gameObject.SetActive(false);//隐藏切换视角
|
||||||
headPanel.SetActive(!mainController.isWatch); //隐藏海拔图观察者的头像
|
headPanel.SetActive(!mainController.isWatch); //隐藏海拔图观察者的头像
|
||||||
|
competitionModel = mainController.cyclingController as CompetitionModel;
|
||||||
if (competitionModel == null)
|
if (competitionModel == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@ -113,7 +113,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
protected virtual void Start()
|
protected virtual void Start()
|
||||||
{
|
{
|
||||||
InitData();//初始
|
InitData();//初始
|
||||||
RenderChart();//渲染海拔图
|
|
||||||
}
|
}
|
||||||
Text totalDistanceCompetition { get; set; }
|
Text totalDistanceCompetition { get; set; }
|
||||||
GameObject distanceIconCompetition { get; set; }
|
GameObject distanceIconCompetition { get; set; }
|
||||||
@ -318,6 +318,7 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
shadowButton.enabled = true;
|
shadowButton.enabled = true;
|
||||||
shadowButton.interactable = true;
|
shadowButton.interactable = true;
|
||||||
}
|
}
|
||||||
|
RenderChart();//渲染海拔图
|
||||||
//默认地图3d/2d
|
//默认地图3d/2d
|
||||||
DefaultView(routeInstance);
|
DefaultView(routeInstance);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,6 +32,8 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
|
|
||||||
public double GetCurrentStart(int currentIndex)
|
public double GetCurrentStart(int currentIndex)
|
||||||
{
|
{
|
||||||
|
if (currentIndex == 0)
|
||||||
|
return 0;
|
||||||
int i = currentIndex / targetPoints;
|
int i = currentIndex / targetPoints;
|
||||||
int max = mData.Count() - targetPoints;
|
int max = mData.Count() - targetPoints;
|
||||||
var current = i * targetPoints;
|
var current = i * targetPoints;
|
||||||
@ -238,6 +240,10 @@ namespace Assets.Scenes.Ride.Scripts
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mData = data;
|
mData = data;
|
||||||
|
if (targetPoints > mData.Count)
|
||||||
|
{
|
||||||
|
targetPoints = mData.Count;
|
||||||
|
}
|
||||||
LoadPage(currentPagePosition); // load the page at position 0
|
LoadPage(currentPagePosition); // load the page at position 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user